Fix FreeBSD build break (#87242)
authorJan Kotas <jkotas@microsoft.com>
Thu, 8 Jun 2023 02:41:32 +0000 (19:41 -0700)
committerGitHub <noreply@github.com>
Thu, 8 Jun 2023 02:41:32 +0000 (19:41 -0700)
src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj

index 42da0a1..7e5f930 100644 (file)
@@ -12,6 +12,8 @@
     <PublishDir>$(RuntimeBinDir)ilc-published/</PublishDir>
     <!-- Can't use NativeAOT in source build yet https://github.com/dotnet/runtime/issues/66859 -->
     <NativeAotSupported Condition="'$(DotNetBuildFromSource)' == 'true'">false</NativeAotSupported>
+    <!-- Disable native AOT on FreeBSD when cross building from Linux. -->
+    <NativeAotSupported Condition="'$(TargetOS)' == 'freebsd' and '$(CrossBuild)' == 'true'">false</NativeAotSupported>
     <PublishAot Condition="'$(NativeAotSupported)' == 'true'">true</PublishAot>
     <SysRoot Condition="'$(NativeAotSupported)' == 'true' and '$(CrossBuild)' == 'true' and '$(HostOS)' != 'windows'">$(ROOTFS_DIR)</SysRoot>
     <PublishReadyToRun Condition="'$(NativeAotSupported)' != 'true'">true</PublishReadyToRun>