Commit Graph

2 Commits

Author SHA1 Message Date
scivision
f3e85754b4 Modules:Check*: refactor: use block(SCOPE_FOR POLICIES) 2023-03-08 14:07:55 -05:00
Craig Scott
a10fc754a6 CheckSourceCompiles: Avoid linker warning with -fembed-bitcode
When the Apple linker sees -headerpad_max_install_names and
bitcode is enabled with a flag like -fembed-bitcode, it issues a warning
and ignores the -headerpad_max_install_names flag. This causes
unrelated compiler and linker flag checks to fail for valid flags.
In f745e0497e (CheckCompilerFlags: Catch linker warning about ignored
flags, 2022-01-03), we started detecting linker warnings, which caused
a regression for projects that were setting -fembed-bitcode in their
CMAKE_CXX_FLAGS or similar. Prevent that regression by removing
the -headerpad_max_install_names linker flag when we know it will
warn and be ignored anyway.

Fixes: #23390
Issue: #23408
2022-04-09 21:51:09 +10:00