CMake: re-enable cargo-test under ASAN

With autocxx/cxx gone, this seems to work fine now.
This commit is contained in:
Johannes Altmanninger 2024-01-07 21:38:49 +01:00
parent e98a794d1c
commit 2871f5070f

View file

@ -157,10 +157,6 @@ if(DEFINED ASAN)
set(cargo_target_opt "--target" ${Rust_CARGO_TARGET}) set(cargo_target_opt "--target" ${Rust_CARGO_TARGET})
endif() endif()
# cargo-test is failing to link w/ ASAN enabled. For some reason it is picking up autocxx ffi
# dependencies, even though `carg test` is supposed to be for rust-only code w/ no ffi dependencies.
# TODO: Figure this out and fix it.
if(NOT DEFINED ASAN)
add_test( add_test(
NAME "cargo-test" NAME "cargo-test"
COMMAND env ${VARS_FOR_CARGO} cargo test ${CARGO_FLAGS} --package fish-rust --target-dir ${rust_target_dir} ${cargo_target_opt} COMMAND env ${VARS_FOR_CARGO} cargo test ${CARGO_FLAGS} --package fish-rust --target-dir ${rust_target_dir} ${cargo_target_opt}
@ -168,7 +164,6 @@ if(NOT DEFINED ASAN)
) )
set_tests_properties("cargo-test" PROPERTIES SKIP_RETURN_CODE ${SKIP_RETURN_CODE}) set_tests_properties("cargo-test" PROPERTIES SKIP_RETURN_CODE ${SKIP_RETURN_CODE})
add_test_target("cargo-test") add_test_target("cargo-test")
endif()
add_test( add_test(
NAME "cargo-test-widestring" NAME "cargo-test-widestring"