Results 226 comments of Johan Engelen
trafficstars

https://github.com/llvm/llvm-project/blob/fbe4ff8149a2b656a66cc0c64a38a5302c051c6e/clang/lib/CodeGen/CodeGenModule.cpp#L1015-L1027

> This should be fixable with the addition of a flag that enables these instructions, as LLVM supports IBT/BTI very well. @ibara I implemented just that. Is that sufficient? This...

> Please remember that aarch64 also needs this, the Clang flag for aarch64 is -mbranch-protection. -mbranch-protection implementation in clang/llvm, see `ARM::parseBranchProtection` (LLVM lib function) and how it is used to...

couldn't this be due to some rounding mode difference?

I just hit this when trying to build LDC locally with LDC 1.36.0 universal, because our ldc2.conf contains: ``` "-Xcc=-target", "-Xcc=arm64-apple-macos", ```

Updated the PR to use target_link_options. This increases the CMake requirement from 3.4 to 3.13. Note that LLVM requires v3.20.

reverted to the old solution if CI likes that better; perhaps somehow the flags are not passed correctly for some of the CI cases with more complex flag setups

This patch without using `target_link_options` does not work with the `-arch` flag that LDC 1.37 universal macOS package uses. (although CI does like that version)

The difference between `target_link_options` and `target_link_libraries` is that the first adds flags at start of commandline, the latter at the end. There are some other small deltas: `target_link_options` `[108/1132] :...

I think I have it working well now. Will clean up after CI confirms.