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

[compiler-rt] Build libfuzzer sources with the chosen C++ compiler #83090

Conversation

arichardson
Copy link
Member

I was getting build failures due to missing when building the
libfuzzer tests. It turns out that the custom command was using
COMPILER_RT_TEST_COMPILER when building the source file rather than
the COMPILER_RT_TEST_CXX_COMPILER.

Created using spr 1.3.4
Created using spr 1.3.4
Created using spr 1.3.4
Copy link
Contributor

@aeubanks aeubanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems reasonable

Created using spr 1.3.4
In my build environment, the output is a relative path:
```
test/dfsan/reaches_function.c:34 add.dfsan
test/dfsan/reaches_function.c:56 main
```

This fixes check-dfsan in my configuration:
```
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja
-DCMAKE_C_COMPILER=$HOME/output/upstream-llvm/bin/clang
-DCMAKE_CXX_COMPILER=$HOME/output/upstream-llvm/bin/clang++
-DCOMPILER_RT_INCLUDE_TESTS=ON
-DLLVM_EXTERNAL_LIT=$HOME/build/upstream-llvm-project-build/bin/llvm-lit
-DLLVM_CMAKE_DIR=$HOME/output/upstream-llvm
-DCOMPILER_RT_DEBUG=OFF
-S $HOME/src/upstream-llvm-project/compiler-rt
-B $HOME/src/upstream-llvm-project/compiler-rt/cmake-build-all-sanitizers
```

Reviewers: browneee, vitalybuka

Reviewed By: vitalybuka

Pull Request: #83089
Created using spr 1.3.4
Created using spr 1.3.4
arichardson added a commit that referenced this pull request Mar 2, 2024
I was getting build failures due to missing <cstddef> when building the
libfuzzer tests. It turns out that the custom command was using
COMPILER_RT_TEST_COMPILER when building the source file rather than
the COMPILER_RT_TEST_CXX_COMPILER.

Pull Request: #83090
@arichardson arichardson closed this Mar 2, 2024
@arichardson arichardson deleted the users/arichardson/spr/compiler-rt-build-libfuzzer-sources-with-the-chosen-c-compiler branch March 2, 2024 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants