gnustep / libobjc2

Objective-C runtime library intended for use with Clang.
http://www.gnustep.org/
MIT License
426 stars 116 forks source link

Don't set -fobjc-runtime=gnustep-2.0 as a global flag #255

Closed qmfrederik closed 6 months ago

qmfrederik commented 6 months ago

Calling:

add_compile_options("$<$<OR:$<COMPILE_LANGUAGE:OBJC>,$<COMPILE_LANGUAGE:OBJCXX>>:-Wno-deprecated-objc-isa-usage;-Wno-objc-root-class;-fobjc-runtime=gnustep-2.0>$<$<COMPILE_LANGUAGE:C>:-Xclang;-fexceptions>")

in CMakeLists.txt will add -fobjc-runtime=gnustep-2.0 as a compile option for all builds. The legacy tests will attempt to target gnustep-1.7 by calling:

addtest_flags("${TEST}_legacy" "-O0 -fobjc-runtime=gnustep-1.7 -UNDEBUG" "${TEST_SOURCE}")

which will result in the same flag being defined twice (-fobjc-runtime=gnustep-2.0 -fobjc-runtime=gnustep-1.7). In my setup, that resulted in clang targeting the 2.0 runtime, making the legacy tests invalid.

davidchisnall commented 6 months ago

Interesting. This should be a last-version-wins flag in clang.

davidchisnall commented 6 months ago

Looks like FreeBSD CI is failing because the versions that we’re testing on are EOL.

davidchisnall commented 6 months ago

[ Updating the branch to pick up fixes to the CI scripts. ]