-
Notifications
You must be signed in to change notification settings - Fork 16
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
Specify sanitizer parameters in CMake #76
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"We need to verify CMAKE_CXX_COMPILER_ID for g++ on macos is AppleClang."
Confirm what the compiler identification is for the default false g++ on Darwin is.
Marking "Request changes" so this doesn't get landed prematurely.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
So, yes: |
Not sure if picking the toolchain for Darwin better, or making the generic toolchain smarter would work better, but either should work? |
Wait, that can't work!
|
I am leaning on having separate tool chain files and having like a central tool chain dispatch logic based on compiler and platform. But then I realized there's not that much variance in building across platforms and compilers, at least in exemplar, to warrant separate files. |
That is why often I use the project_options |
That's project looks fantastic! I can bring this up in weekly sync and see if we want to use this. |
Ah I think tool chain file is executed before |
5f20499
to
117fcd9
Compare
a3f18b3
to
b000f40
Compare
Yes, and call N times for each LANGUAGES enabled in |
This comment was marked as resolved.
This comment was marked as resolved.
This reverts commit 87ac8ed.
So I decide to not implement a toolchain file instead adding a generic I added a macos run of @steve-downey you may review and unblock this PR |
FYI: I have just added project_options as demo here: |
nudging @steve-downey @neatudarius @camio to review as #80 maybe improved if this is merged. |
This PR attempts adopts @bretbrownjr 's suggestion in #44 (review).
However, instead of implementing a toolchain file, this PR introduces a
apply_sanitzer
util.The reason for not adopting a toolchain file is because
CMAKE_CXX_COMPILER_ID
is not resolved during toolchain execution, which means we are unable to customize sanitizer use according to compiler support.This PR updates CI script to use the new sanitizer utility.
This sanitizer utility exports an undocumented option of
BEMAN_BUILDSYS_SANITIZER
and is not to be used outside of internal build script/ preset/ CI. UsingBEMAN_BUILDSYS
as its namespace so that this functionality could be copied over across projects easily.This PR fixes #65 as it does not add leak sanitizer when apple clang is detected, this needs testing (I think @camio have a mac environment?).
Preset change will be filed after #82 is merged.