-
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
clang++: error: unsupported option '-fsanitize=leak' for target 'x86_64-apple-darwin23.6.0' #65
Comments
You may find some good i.e ci.yml |
I was able to reproduce this on OSX with Apple silicon. The issue is that OSX has a
Apple clang doesn't have a "leak" sanitizer like gcc does. One way to fix is to add clang-debug/clang-release presets and point people to those when they're on an OSX platform. |
An other way is to use a Module like Sanitizers.cmake and keep the preset generic. Same for compiler warnings: CompilerWarnings.cmake This has also the advantage of not propagating the See for usage examples |
is the fix going to be bundled into #66? |
Would compiler detection + a tool chain file solve this issue? May relate: #44 (review) ? |
Yes |
Although for memory and thread sanitizer you must propagate the settings, or the sanitizers don't work. |
Toolchain would probably help here. I find it worth it, just to have a single identifier to consolidate the dimensions across the far too many compilers I have locally. I'm lucky I can usually ignore OS, bundling that into the "compiler" choice. |
Also answers my question on the PR. I'll check into what our (mostly self supported) darwin builds are doing in this situation. The default style in house is Lakosian foobar.{cpp/h/t.cpp} triples even if the cpp file is empty other than including the header. It ensures that the header builds, and on some of our older vendor compilers avoided weird link issues with the vtbl not being found. Also made it easier when something was found that did need to be in the cpp file rather than the header. The newer VERIFY_INTERFACE_HEADER_SETS would fix the broken header problem. Tracking down errors showing up in downstream usage can be frustrating. "Shifting left" finding the typo in the header helps. It's why we run unit tests in our package builds, too. |
The text was updated successfully, but these errors were encountered: