ruby/misc/test_yjit_asm.sh
Alan Wu 00be5846e4 Fix non RUBY_DEBUG build warnings
On non RUBY_DEBUG builds, assert() compiles to nothing and the compiler
warns about uninitialized variables in those code paths. Replace
those asserts with rb_bug() to fix the warnings and do the assert in
all builds. Since yjit_asm_tests.c compiles outside of Ruby, it needed
a distinct version of rb_bug().

Also put YJIT_STATS check for function delcaration that is only defined
in YJIT_STATS builds.
2021-10-20 18:19:43 -04:00

10 lines
159 B
Bash
Executable file

#!/bin/bash
set -e
set -x
clang -std=gnu99 -Wall -Werror -Wno-error=unused-function -Wshorten-64-to-32 yjit_asm_tests.c -o asm_test
./asm_test
rm asm_test