Not all options are passed on to bcc64x.exe
Posted: Tue May 06, 2025 6:01 am
The (relatively new) project options "BCC_InstructionSet_v15", "BCC_AddressSanitizer" and "BCC_UndefinedBehaviorSanitizer" are not passed on to bcc64x.exe. I accidentally found this out when my PCH file was compiled by TwineCompile and I tried to compile a cpp file directly with bcc64x.exe. This may explain why I was never able to notice a difference with these options. I was assuming every option (whether new or old) would have been passed on to bcc64x.exe. And I am wondering if it is possible some other options also aren't passed on (correctly).
The errors I got were:
When not using TwineCompile, bcc64x.exe gets these options:
With "BCC_InstructionSet_v15":
With "BCC_UndefinedBehaviorSanitizer":
With "BCC_AddressSanitizer":
Combined:
The errors I got were:
Code: Select all
\CodeGear.Cpp.Targets(3044,5): error E790: current translation unit is compiled with the target feature '-fsanitize=address' but the AST file was not
\CodeGear.Cpp.Targets(3044,5): error E790: current translation unit is compiled with the target feature '+sse4.2' but the AST file was not
When not using TwineCompile, bcc64x.exe gets these options:
With "BCC_InstructionSet_v15":
Code: Select all
-target-feature +sse4.2
Code: Select all
-fsanitize=alignment,array-bounds,bool,builtin,enum,float-cast-overflow,integer-divide-by-zero,nonnull-attribute,null,pointer-overflow,return,returns-nonnull-attribute,shift-base,shift-exponent,signed-integer-overflow,unreachable,vla-bound,vptr
-fsanitize-recover=alignment,array-bounds,bool,builtin,enum,float-cast-overflow,integer-divide-by-zero,nonnull-attribute,null,pointer-overflow,returns-nonnull-attribute,shift-base,shift-exponent,signed-integer-overflow,vla-bound,vptr
Code: Select all
-fsanitize=address
-fsanitize-address-use-after-scope
-fsanitize-address-globals-dead-stripping
-fno-assume-sane-operator-new
Code: Select all
-target-feature +sse4.2
-fsanitize=address,alignment,array-bounds,bool,builtin,enum,float-cast-overflow,integer-divide-by-zero,nonnull-attribute,null,pointer-overflow,return,returns-nonnull-attribute,shift-base,shift-exponent,signed-integer-overflow,unreachable,vla-bound,vptr
-fsanitize-recover=alignment,array-bounds,bool,builtin,enum,float-cast-overflow,integer-divide-by-zero,nonnull-attribute,null,pointer-overflow,returns-nonnull-attribute,shift-base,shift-exponent,signed-integer-overflow,vla-bound,vptr
-fsanitize-address-use-after-scope
-fsanitize-address-globals-dead-stripping
-fno-assume-sane-operator-new