Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sanitizer details to README_cmake.md #7688

Merged
merged 1 commit into from
Jul 18, 2023
Merged

Conversation

steven-johnson
Copy link
Contributor

No description provided.

@steven-johnson steven-johnson added the skip_buildbots Synonym for buildbot_test_nothing label Jul 18, 2023
@steven-johnson steven-johnson merged commit 18fbc15 into main Jul 18, 2023
@steven-johnson steven-johnson deleted the srj/asan-readme branch July 18, 2023 18:17
@TH3CHARLie
Copy link
Contributor

I'm following the build instructions from this README update, one thing I've noticed is that I can build fuzz_xxx tests using the --preset linux-x64-fuzzer . But when I want to build the project without explictly enabling fuzzing, it still gives me fuzz tests build errors. Does this has something to do with newly enabled LLVM runtimes? And does this imply you need a different LLVM build specifically for fuzzing? (not compatible with the original one)

so this works:

CC=/home/xuanda/dev/llvm16-install/bin/clang  CXX=/home/xuanda/dev/llvm16-install/bin/clang++  cmake -G "Unix Makefiles" -DWITH_PYTHON_BINDINGS=off -DCMAKE_BUILD_TYPE=Release -DLLVM_DIR=/home/xuanda/dev/llvm16-install/lib/cmake/llvm -S . -B build --preset linux-x64-fuzzer

this doesn't

CC=/home/xuanda/dev/llvm16-install/bin/clang  CXX=/home/xuanda/dev/llvm16-install/bin/clang++  cmake -G "Unix Makefiles" -DWITH_PYTHON_BINDINGS=off -DCMAKE_BUILD_TYPE=Release -DLLVM_DIR=/home/xuanda/dev/llvm16-install/lib/cmake/llvm -S . -B build

it gives the below errors

[ 86%] Building CXX object test/fuzz/CMakeFiles/fuzz_bounds.dir/bounds.cpp.o
error: current translation unit is compiled with the target feature '-fsanitize=fuzzer-no-link' but the AST file was not
1 error generated.
make[2]: *** [test/fuzz/CMakeFiles/fuzz_bounds.dir/build.make:78: test/fuzz/CMakeFiles/fuzz_bounds.dir/bounds.cpp.o] Error 1

@TH3CHARLie
Copy link
Contributor

I guess you have to explicitly turn off fuzz tests if you are using compiler that can set HAS_FUZZ_FLAGS to true

@steven-johnson
Copy link
Contributor Author

Ah, interesting, looks like an oversight in our support. Let me see if I can smarten it.

@steven-johnson
Copy link
Contributor Author

See #7695

ardier pushed a commit to ardier/Halide-mutation that referenced this pull request Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip_buildbots Synonym for buildbot_test_nothing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants