aboutsummaryrefslogtreecommitdiff
path: root/run_cross_test.py
diff options
context:
space:
mode:
authorJordan Justen <jljusten@gmail.com>2021-02-26 10:24:25 -0800
committerDylan Baker <dylan@pnwbakers.com>2021-02-26 11:58:47 -0800
commite127e47d7a5aadc18240c920c8b24f32acff67a2 (patch)
tree188c1e4e4d8cb0d9b1ca34012ffa39696f3a590c /run_cross_test.py
parente0795539598c8dd21756158d0687b461712f0a21 (diff)
downloadmeson-e127e47d7a5aadc18240c920c8b24f32acff67a2.zip
meson-e127e47d7a5aadc18240c920c8b24f32acff67a2.tar.gz
meson-e127e47d7a5aadc18240c920c8b24f32acff67a2.tar.bz2
tests/rust: Add rust case linking to libm in rust static library
When building on Linux, I see: rustc -C linker=cc --color=always --crate-type rlib --crate-name rs_math -g --emit dep-info=rs_math.d --emit link -L /usr/lib/x86_64-linux-gnu -o librs_math.rlib -l static=m ../rs_math.rs error: failed to add native library /usr/lib/x86_64-linux-gnu/libm.a: file too small to be an archive I think the "file too small to be an archive" message is coming from libLLVM, and is a case of LLVM not handling this type of "script archive". So, possibly this is just LLVM not handling a linking case. The rust_args usage in meson.build is invalid, but required to reproduce the issue in the test case. Perhaps meson should automatically add the library include path via the dep_m meson object, or maybe the meson.build can add the link path in a better way. Changing '-l static=m' to '-l dylib=m' appears to fix this case. (See comments in meson.build.)
Diffstat (limited to 'run_cross_test.py')
0 files changed, 0 insertions, 0 deletions