Skip to content

Commit

Permalink
Work around -no_weak_imports issue with recent Xcode (#36436)
Browse files Browse the repository at this point in the history
See mono/mono#19393.

We can use the `-Werror=partial-availability` as a good alternative until the Xcode bug is fixed.
  • Loading branch information
akoeplinger authored May 14, 2020
1 parent c711920 commit 0c39507
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/mono/mono.proj
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand All @@ -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,-no_weak_imports" />--> <!-- TODO: reenable once Xcode bug is fixed: https://github.com/mono/mono/issues/19393 -->
<_MonoLDFLAGS Include="-Wl,-bitcode_bundle" />
<_MonoLDFLAGS Include="-framework CoreFoundation" />
<_MonoLDFLAGS Include="-lobjc" />
Expand Down Expand Up @@ -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" />

Expand All @@ -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="-Wl,-no_weak_imports" />--> <!-- TODO: reenable once Xcode bug is fixed: https://github.com/mono/mono/issues/19393 -->
<_MonoLDFLAGS Include="-framework CoreFoundation" />
<_MonoLDFLAGS Include="-lobjc" />
<_MonoLDFLAGS Include="-lc++" />
Expand Down

0 comments on commit 0c39507

Please sign in to comment.