(Resending since SF rejected my original message)

On 2/3/2025 22:21, Martin Storsjö wrote:

I guess there's no prepreocessor define we can check in loadcfg.S, so we'd need to pass one from the build system, when building with --enable-cfguard, which can be used to switch between including or omitting these pointers in the load config, irght?
Currently there is not. At least for Clang, the build system will need to pass a custom define to toggle this behaviour.

Honestly I've never thought about this before, so I just gave it a check on MSVC. Testing with the version I have installed (19.35.32215), by comparing the output of `cl /PD /Zc:preprocessor test.cpp` and `cl /PD /Zc:preprocessor /guard:cf test.cpp`. To my surprise (or maybe I shouldn't have been surprised?), the output of the latter command has an additional `#define _CONTROL_FLOW_GUARD 1`. It seems to me that LLVM/Clang does not implement this behaviour, even in MSVC mode. We might need to request this to be implemented upstream.

Regardless, mingw-w64 will need to support versions of LLVM without this preprocessor. Also, I'm not sure if this preprocessor would even apply to assembly files.

Best Regards,
Alvin


_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to