aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-03-07 22:55:43 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2023-03-07 22:58:11 -0800
commit9df1f58e018a0c7fd4d9268d9aeb71b277c653db (patch)
treead10c368971cbaaf4c76869bfc160ebf812db600 /configure.ac
parent6d91df08b53d0b17fa8cd949a3c6b42164c46c8d (diff)
downloadruby-9df1f58e018a0c7fd4d9268d9aeb71b277c653db.tar.gz
Link libcapstone no matter what cargo does
libcapstone used to break when it's linked from C and Rust at the same time, but it doesn't seem to happen anymore. Maybe it's related to recent symbol hygiene changes. Thank you if that's the case. This commit allows you to make both --enable-rjit=dev and --enable-yjit=dev work in the same binary.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 4 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index f79c900099..e2309607ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3864,16 +3864,12 @@ AC_ARG_ENABLE(rjit,
)]
)
-AS_CASE(["${RJIT_SUPPORT}"],
+AS_CASE(["$RJIT_SUPPORT"],
[yes|dev], [
- AS_CASE(["${RJIT_SUPPORT}"],
+ AS_CASE(["$RJIT_SUPPORT"],
[dev], [
- # Link libcapstone for --rjit-dump-disasm. If YJIT links libcapstone
- # with cargo, linking libcapstone here doesn't work. It should be
- # linked for RJIT only when YJIT doesn't.
- AS_IF([test -z "$CARGO_BUILD_ARGS"], [
- AC_CHECK_LIB([capstone], [cs_disasm])
- ])
+ # Link libcapstone for --rjit-dump-disasm
+ AC_CHECK_LIB([capstone], [cs_disasm])
# Enable RJIT_STATS (vm_insns_count of --rjit-stats)
AC_DEFINE(RUBY_DEBUG, 1)