From 0c39507daafc57e515e454709b991312f2ccc0b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Thu, 14 May 2020 14:48:51 +0200 Subject: [PATCH] Work around -no_weak_imports issue with recent Xcode (#36436) See https://github.com/mono/mono/issues/19393. We can use the `-Werror=partial-availability` as a good alternative until the Xcode bug is fixed. --- src/mono/mono.proj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index e0224d5b0c30d..76f5dba28afce 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -134,6 +134,7 @@ <_MonoCFLAGS Condition="'$(Platform)' == 'arm64'" Include="-arch arm64" /> <_MonoCFLAGS Include="-isysroot $(XcodeDir)/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS$(tvOSVersion).sdk" /> <_MonoCFLAGS Include="-mtvos-version-min=$(tvOSVersionMin)" /> + <_MonoCFLAGS Include="-Werror=partial-availability" /> <_MonoCFLAGS Include="-Wl,-application_extension" /> <_MonoCFLAGS Include="-fexceptions" /> <_MonoCFLAGS Include="-fembed-bitcode" /> @@ -158,7 +159,7 @@ <_MonoCPPFLAGS Include="-DHAVE_LARGE_FILE_SUPPORT=1" /> <_MonoLDFLAGS Condition="'$(Platform)' == 'arm64'" Include="-arch arm64" /> - <_MonoLDFLAGS Include="-Wl,-no_weak_imports" /> + <_MonoLDFLAGS Include="-Wl,-bitcode_bundle" /> <_MonoLDFLAGS Include="-framework CoreFoundation" /> <_MonoLDFLAGS Include="-lobjc" /> @@ -278,6 +279,7 @@ <_MonoCFLAGS Condition="'$(Platform)' == 'arm'" Include="-arch armv7s" /> <_MonoCFLAGS Include="-isysroot $(XcodeDir)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(iOSVersion).sdk" /> <_MonoCFLAGS Include="-miphoneos-version-min=$(iOSVersionMin)" /> + <_MonoCFLAGS Include="-Werror=partial-availability" /> <_MonoCFLAGS Include="-Wl,-application_extension" /> <_MonoCFLAGS Include="-fexceptions" /> @@ -303,7 +305,7 @@ <_MonoLDFLAGS Condition="'$(Platform)' == 'arm64'" Include="-arch arm64" /> <_MonoLDFLAGS Condition="'$(Platform)' == 'arm'" Include="-arch armv7" /> <_MonoLDFLAGS Condition="'$(Platform)' == 'arm'" Include="-arch armv7s" /> - <_MonoLDFLAGS Include="-Wl,-no_weak_imports" /> + <_MonoLDFLAGS Include="-framework CoreFoundation" /> <_MonoLDFLAGS Include="-lobjc" /> <_MonoLDFLAGS Include="-lc++" />