diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-04-08 12:47:27 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-04-08 12:47:27 +0900 |
commit | 08324ab9eb97535b5994450186c5048be3c0cd62 (patch) | |
tree | cb0cee4fdf1c024e0e611e70baa9289a16caab70 /configure.ac | |
parent | a9bfb64153ae0a07d498d0976d335b65515fd1b1 (diff) |
Include `--no-llvm-bc` option in `NM` macro only if usable
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7677
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 4bc9b60159..68ad4fef8c 100644 --- a/configure.ac +++ b/configure.ac @@ -258,6 +258,10 @@ AC_CHECK_TOOLS([OBJCOPY], [gobjcopy objcopy], [:]) AC_CHECK_TOOLS([OBJDUMP], [gobjdump objdump]) AC_CHECK_TOOLS([STRIP], [gstrip strip], [:]) +# nm errors with Rust's LLVM bitcode when Rust uses a newer LLVM version than nm. +# In case we're working with llvm-nm, tell it to not worry about the bitcode. +AS_IF([${NM} --help | grep -q 'llvm-bc'], [NM="$NM --no-llvm-bc"]) + AS_IF([test ! $rb_test_CFLAGS], [AS_UNSET(CFLAGS)]); AS_UNSET(rb_test_CFLAGS) AS_IF([test ! $rb_test_CXXFLAGS], [AS_UNSET(CXXFLAGS)]); AS_UNSET(rb_save_CXXFLAGS) |