diff --git a/eng/build.ps1 b/eng/build.ps1 index fe3ff54689b4ae..214b8a0c3ed79f 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -6,7 +6,7 @@ Param( [string][Alias('f')]$framework, [string]$vs, [string][Alias('v')]$verbosity = "minimal", - [ValidateSet("windows","Linux","OSX","Browser")][string]$os, + [ValidateSet("windows","Linux","OSX","Android","Browser")][string]$os, [switch]$allconfigurations, [switch]$coverage, [string]$testscope, @@ -35,7 +35,7 @@ function Get-Help() { Write-Host " -help (-h) Print help and exit." Write-Host " -librariesConfiguration (-lc) Libraries build configuration: Debug or Release." Write-Host " [Default: Debug]" - Write-Host " -os Target operating system: windows, Linux, OSX, or Browser." + Write-Host " -os Target operating system: windows, Linux, OSX, Android or Browser." Write-Host " [Default: Your machine's OS.]" Write-Host " -runtimeConfiguration (-rc) Runtime build configuration: Debug, Release or Checked." Write-Host " Checked is exclusive to the CLR runtime. It is the same as Debug, except code is" diff --git a/eng/pipelines/mono/templates/build-job.yml b/eng/pipelines/mono/templates/build-job.yml index 48b18b1c8b50c3..62029d89d6fc6d 100644 --- a/eng/pipelines/mono/templates/build-job.yml +++ b/eng/pipelines/mono/templates/build-job.yml @@ -96,6 +96,11 @@ jobs: - ${{ if gt(length(parameters.monoCrossAOTTargetOS),0) }}: - name: aotCrossParameter value: /p:MonoCrossAOTTargetOS=${{join('+',parameters.monoCrossAOTTargetOS)}} /p:SkipMonoCrossJitConfigure=true /p:BuildMonoAOTCrossCompilerOnly=true + - name: ninjaArg + value: '' + - ${{ if eq(parameters.osGroup, 'windows') }}: + - name: ninjaArg + value: '-ninja' - ${{ parameters.variables }} steps: @@ -127,10 +132,10 @@ jobs: # Build - ${{ if ne(parameters.osGroup, 'windows') }}: - - script: ./build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) + - script: ./build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) $(ninjaArg) displayName: Build product - ${{ if eq(parameters.osGroup, 'windows') }}: - - script: build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) + - script: build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) $(ninjaArg) displayName: Build product - ${{ if in(parameters.osGroup, 'OSX', 'iOS','tvOS') }}: @@ -152,10 +157,10 @@ jobs: # Build packages - ${{ if ne(parameters.osGroup, 'windows') }}: - - script: ./build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) -pack $(OutputRidArg) + - script: ./build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) $(ninjaArg) -pack $(OutputRidArg) displayName: Build nupkg - ${{ if eq(parameters.osGroup, 'windows') }}: - - script: build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) -pack $(OutputRidArg) + - script: build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) $(ninjaArg) -pack $(OutputRidArg) displayName: Build nupkg # Publish official build diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml index 258218bf331ecf..479177e709111c 100644 --- a/eng/pipelines/runtime-official.yml +++ b/eng/pipelines/runtime-official.yml @@ -148,9 +148,11 @@ stages: buildConfig: release platforms: - Linux_x64 + - Windows_x64 jobParameters: buildArgs: -s mono+packs -c $(_BuildConfig) /p:MonoCrossAOTTargetOS=Android+Browser /p:SkipMonoCrossJitConfigure=true /p:BuildMonoAOTCrossCompilerOnly=true + -ninja nameSuffix: CrossAOT_Mono runtimeVariant: crossaot dependsOn: diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index a4f3dcd0d286e8..7b34be9f764775 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -492,7 +492,7 @@ jobs: - Linux_x64 # - Linux_arm64 # - Linux_musl_arm64 - # - windows_x64 + - Windows_x64 # - windows_x86 # - windows_arm # - windows_arm64 diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/monocrossaot.sfxproj b/src/installer/pkg/sfx/Microsoft.NETCore.App/monocrossaot.sfxproj index 1e9216a3c0bd62..7e63e89f31ccf9 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/monocrossaot.sfxproj +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/monocrossaot.sfxproj @@ -2,7 +2,8 @@ <_MonoCrossAOTTargetOS Condition="'$(MonoCrossAOTTargetOS)' != ''">+$(MonoCrossAOTTargetOS.ToLowerInvariant())+ - $(MonoAotTargets);android-x64;android-arm64;android-x86;android-arm + $(MonoAotTargets);android-x64;android-arm64;android-x86;android-arm + $(MonoAotTargets);android-x64 $(MonoAotTargets);browser-wasm $(MonoAotTargets);tvos-x64;tvos-arm64 $(MonoAotTargets);ios-x64;ios-arm64;ios-x86;ios-arm diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt index 246e3c3dbe1798..7b12819598b4e2 100644 --- a/src/mono/CMakeLists.txt +++ b/src/mono/CMakeLists.txt @@ -451,21 +451,21 @@ if(LLVM_PREFIX) set(llvm_cxxflags "-I${LLVM_PREFIX}/include") # llvm-config --system-libs - set(llvm_system_libs "-lz -lrt -ldl -lpthread -lm") + set(llvm_system_libs "-lz" "-lrt" "-ldl" "-lpthread" "-lm") # llvm-config --libs analysis core bitwriter mcjit orcjit - set(llvm_core_libs "-lLLVMOrcJIT -lLLVMJITLink -lLLVMMCJIT -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMAsmPrinter -lLLVMDebugInfoDWARF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMBitReader -lLLVMBitstreamReader -lLLVMCore -lLLVMRemarks -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle") + set(llvm_core_libs "-lLLVMOrcJIT" "-lLLVMJITLink" "-lLLVMMCJIT" "-lLLVMExecutionEngine" "-lLLVMRuntimeDyld" "-lLLVMAsmPrinter" "-lLLVMDebugInfoDWARF" "-lLLVMCodeGen" "-lLLVMTarget" "-lLLVMScalarOpts" "-lLLVMInstCombine" "-lLLVMAggressiveInstCombine" "-lLLVMTransformUtils" "-lLLVMBitWriter" "-lLLVMAnalysis" "-lLLVMProfileData" "-lLLVMObject" "-lLLVMMCParser" "-lLLVMMC" "-lLLVMDebugInfoCodeView" "-lLLVMDebugInfoMSF" "-lLLVMBitReader" "-lLLVMBitstreamReader" "-lLLVMCore" "-lLLVMRemarks" "-lLLVMBinaryFormat" "-lLLVMSupport" "-lLLVMDemangle") # Check codegen libs and add needed libraries. if("${llvm_codegen_libs}" STREQUAL "x86codegen") # llvm-config --libs x86codegen - set(llvm_extra "-lLLVMX86CodeGen -lLLVMGlobalISel -lLLVMX86Desc -lLLVMX86Utils -lLLVMX86Info -lLLVMMCDisassembler -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoDWARF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMBitReader -lLLVMBitstreamReader -lLLVMCore -lLLVMRemarks -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle") + set(llvm_extra "-lLLVMX86CodeGen" "-lLLVMGlobalISel" "-lLLVMX86Desc" "-lLLVMX86Utils" "-lLLVMX86Info" "-lLLVMMCDisassembler" "-lLLVMSelectionDAG" "-lLLVMAsmPrinter" "-lLLVMDebugInfoDWARF" "-lLLVMCodeGen" "-lLLVMTarget" "-lLLVMScalarOpts" "-lLLVMInstCombine" "-lLLVMAggressiveInstCombine" "-lLLVMTransformUtils" "-lLLVMBitWriter" "-lLLVMAnalysis" "-lLLVMProfileData" "-lLLVMObject" "-lLLVMMCParser" "-lLLVMMC" "-lLLVMDebugInfoCodeView" "-lLLVMDebugInfoMSF" "-lLLVMBitReader" "-lLLVMBitstreamReader" "-lLLVMCore" "-lLLVMRemarks" "-lLLVMBinaryFormat" "-lLLVMSupport" "-lLLVMDemangle") elseif("${llvm_codegen_libs}" STREQUAL "armcodegen") # llvm-config --libs armcodegen - set(llvm_extra "-lLLVMARMCodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoDWARF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMBitstreamReader -lLLVMCore -lLLVMRemarks -lLLVMARMDesc -lLLVMMCDisassembler -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMBinaryFormat -lLLVMARMUtils -lLLVMARMInfo -lLLVMSupport -lLLVMDemangle") + set(llvm_extra "-lLLVMARMCodeGen" "-lLLVMGlobalISel" "-lLLVMSelectionDAG" "-lLLVMAsmPrinter" "-lLLVMDebugInfoDWARF" "-lLLVMCodeGen" "-lLLVMTarget" "-lLLVMScalarOpts" "-lLLVMInstCombine" "-lLLVMAggressiveInstCombine" "-lLLVMTransformUtils" "-lLLVMBitWriter" "-lLLVMAnalysis" "-lLLVMProfileData" "-lLLVMObject" "-lLLVMMCParser" "-lLLVMBitReader" "-lLLVMBitstreamReader" "-lLLVMCore" "-lLLVMRemarks" "-lLLVMARMDesc" "-lLLVMMCDisassembler" "-lLLVMMC" "-lLLVMDebugInfoCodeView" "-lLLVMDebugInfoMSF" "-lLLVMBinaryFormat" "-lLLVMARMUtils" "-lLLVMARMInfo" "-lLLVMSupport" "-lLLVMDemangle") elseif("${llvm_codegen_libs}" STREQUAL "aarch64codegen") # llvm-config --libs aarch64codegen - set(llvm_extra "-lLLVMAArch64CodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoDWARF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMBitstreamReader -lLLVMCore -lLLVMRemarks -lLLVMAArch64Desc -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMBinaryFormat -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMSupport -lLLVMDemangle") + set(llvm_extra "-lLLVMAArch64CodeGen" "-lLLVMGlobalISel" "-lLLVMSelectionDAG" "-lLLVMAsmPrinter" "-lLLVMDebugInfoDWARF" "-lLLVMCodeGen" "-lLLVMTarget" "-lLLVMScalarOpts" "-lLLVMInstCombine" "-lLLVMAggressiveInstCombine" "-lLLVMTransformUtils" "-lLLVMBitWriter" "-lLLVMAnalysis" "-lLLVMProfileData" "-lLLVMObject" "-lLLVMMCParser" "-lLLVMBitReader" "-lLLVMBitstreamReader" "-lLLVMCore" "-lLLVMRemarks" "-lLLVMAArch64Desc" "-lLLVMMC" "-lLLVMDebugInfoCodeView" "-lLLVMDebugInfoMSF" "-lLLVMBinaryFormat" "-lLLVMAArch64Utils" "-lLLVMAArch64Info" "-lLLVMSupport" "-lLLVMDemangle") else() message(FATAL_ERROR "FIXME: ${TARGET_ARCH}") endif() @@ -483,8 +483,10 @@ if(LLVM_PREFIX) endif() execute_process(COMMAND ${LLVM_CONFIG} --cflags OUTPUT_VARIABLE llvm_cflags OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND ${LLVM_CONFIG} --cxxflags OUTPUT_VARIABLE llvm_cxxflags OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND ${LLVM_CONFIG} --system-libs OUTPUT_VARIABLE llvm_system_libs OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND ${LLVM_CONFIG} --libs analysis core bitwriter mcjit orcjit ${llvm_codegen_libs} OUTPUT_VARIABLE llvm_libs OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${LLVM_CONFIG} --system-libs OUTPUT_VARIABLE llvm_system_libs_space_separated OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${LLVM_CONFIG} --libs analysis core bitwriter mcjit orcjit ${llvm_codegen_libs} OUTPUT_VARIABLE llvm_libs_space_separated OUTPUT_STRIP_TRAILING_WHITESPACE) + separate_arguments(llvm_system_libs NATIVE_COMMAND ${llvm_system_libs_space_separated}) + separate_arguments(llvm_libs NATIVE_COMMAND ${llvm_libs_space_separated}) endif() if (${llvm_api_version} LESS 900) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 40537a2f5d539d..9d771022bc5cc7 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -15,6 +15,7 @@ $(ROOTFS_DIR) false + .exe .cmd .sh coreclr.dll @@ -137,7 +138,7 @@ <_MonoCMakeArgs Include="-DCMAKE_INSTALL_LIBDIR=lib"/> <_MonoCMakeArgs Include="-DCMAKE_BUILD_TYPE=$(Configuration)"/> <_MonoCMakeArgs Condition="'$(CMakeArgs)' != ''" Include="$(CMakeArgs)"/> - <_MonoCMakeArgs Condition="'$(MonoEnableLLVM)' == 'true'" Include="-DLLVM_PREFIX=$(MonoLLVMDir)" /> + <_MonoCMakeArgs Condition="'$(MonoEnableLLVM)' == 'true'" Include="-DLLVM_PREFIX=$(MonoLLVMDir.TrimEnd('\/'))" /> <_MonoCMakeArgs Include="-DGC_SUSPEND=$(MonoThreadSuspend)" /> @@ -414,6 +415,38 @@ $(EMSDK_PATH)/upstream/lib/libclang.so + + + <_MonoAOTCPPFLAGS Include="-DHOST_WIN32" /> + <_MonoAOTCPPFLAGS Include="-D__WIN32__" /> + <_MonoAOTCPPFLAGS Include="-DWIN32" /> + <_MonoAOTCPPFLAGS Include="-DWIN32_LEAN_AND_MEAN" /> + + <_MonoAOTCPPFLAGS Condition="'$(Platform)' == 'x64' or '$(Platform)' == 'arm64'" Include="-DWIN64" /> + <_MonoAOTCPPFLAGS Condition="'$(Configuration)' == 'Release'" Include="-DNDEBUG" /> + <_MonoAOTCPPFLAGS Condition="'$(Configuration)' == 'Debug'" Include="-D_DEBUG" /> + + <_MonoAOTCPPFLAGS Include="-D_CRT_SECURE_NO_WARNINGS" /> + <_MonoAOTCPPFLAGS Include="-D_CRT_NONSTDC_NO_DEPRECATE" /> + + <_MonoAOTCPPFLAGS Include="-DWIN32_THREADS" /> + <_MonoAOTCPPFLAGS Include="-DWINVER=0x0601" /> + <_MonoAOTCPPFLAGS Include="-D_WIN32_WINNT=0x0601" /> + <_MonoAOTCPPFLAGS Include="-D_WIN32_IE=0x0501" /> + <_MonoAOTCPPFLAGS Include="-D_UNICODE" /> + <_MonoAOTCPPFLAGS Include="-DUNICODE" /> + <_MonoAOTCPPFLAGS Include="-DFD_SETSIZE=1024" /> + <_MonoAOTCPPFLAGS Include="-DNVALGRIND" /> + + + + + + + + + + true @@ -428,13 +461,14 @@ $(XcodeDir)/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib $(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/linux-x86_64/lib64/libclang.so.9svn + c:/dev/LLVM/bin/libclang.dll $(MonoCrossDir) - + @@ -443,13 +477,13 @@ - <_MonoAOTCFLAGSOption>-DCMAKE_C_FLAGS="@(_MonoAOTCFLAGS, ' ')" - <_MonoAOTCXXFLAGSOption>-DCMAKE_CXX_FLAGS="@(_MonoAOTCXXFLAGS, ' ')" + <_MonoAOTCFLAGSOption>-DCMAKE_C_FLAGS="@(_MonoAOTCPPFLAGS, ' ') @(_MonoAOTCFLAGS, ' ')" + <_MonoAOTCXXFLAGSOption>-DCMAKE_CXX_FLAGS="@(_MonoAOTCPPFLAGS, ' ') @(_MonoAOTCXXFLAGS, ' ')" - + @@ -457,7 +491,7 @@ - + @@ -465,20 +499,16 @@ - - - - - - - + <_MonoAotCrossOffsetsCommand Condition="'$(MonoUseCrossTool)' == 'true'">python3 $(MonoProjectRoot)mono/tools/offsets-tool/offsets-tool.py @(MonoAotCrossOffsetsToolParams, ' ') <_MonoAotCMakeConfigureCommand>cmake @(MonoAOTCMakeArgs, ' ') $(MonoProjectRoot) + <_MonoAotCMakeConfigureCommand Condition="'$(OS)' == 'Windows_NT'">set __repoRoot="$(RepoRoot)" && call "$(RepositoryEngineeringDir)native\init-compiler-and-cmake.cmd" $(Platform) && cd /D "$(MonoObjDir)\cross" && @(_MonoBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand) <_MonoAotCMakeBuildCommand>cmake --build . --target install --config $(Configuration) <_MonoAotCMakeBuildCommand Condition="'$(MonoVerboseBuild)' == 'true'">$(_MonoAotCMakeBuildCommand) --verbose <_MonoAotCMakeBuildCommand Condition="'$(_MonoUseNinja)' != 'true'">$(_MonoAotCMakeBuildCommand) --parallel $([System.Environment]::ProcessorCount) + <_MonoAotCMakeBuildCommand Condition="'$(OS)' == 'Windows_NT'">set __repoRoot="$(RepoRoot)" && call "$(RepositoryEngineeringDir)native\init-compiler-and-cmake.cmd" $(Platform) && cd /D "$(MonoObjDir)\cross" && @(_MonoBuildEnv, ' ') $(_MonoAotCMakeBuildCommand) <_MonoAotPrebuiltOffsetsFile>$(ArtifactsObjDir)\mono\offsetfiles\$(PlatformConfigPathPart)\cross\$([System.IO.Path]::GetFileName('$(MonoAotOffsetsFile)')) @@ -526,7 +556,7 @@ <_MonoIncludeInterpStaticFiles Condition="'$(TargetsBrowser)' == 'true'">true - <_MonoAotCrossFilePath>$(MonoObjDir)cross\out\bin\mono-sgen + <_MonoAotCrossFilePath>$(MonoObjDir)cross\out\bin\mono-sgen$(ExeExt) @@ -538,19 +568,19 @@ $(RuntimeBinDir)$(MonoStaticFileName) <_MonoRuntimeArtifacts Include="$(_MonoAotCrossFilePath)"> - $(RuntimeBinDir)cross\$(PackageRID)\mono-aot-cross + $(RuntimeBinDir)cross\$(PackageRID)\mono-aot-cross$(ExeExt) - <_MonoRuntimeArtifacts Condition="'$(MonoBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\bin\llc"> - $(RuntimeBinDir)\llc + <_MonoRuntimeArtifacts Condition="'$(MonoBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\bin\llc$(ExeExt)"> + $(RuntimeBinDir)\llc$(ExeExt) - <_MonoRuntimeArtifacts Condition="'$(MonoBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\bin\opt"> - $(RuntimeBinDir)\opt + <_MonoRuntimeArtifacts Condition="'$(MonoBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\bin\opt$(ExeExt)"> + $(RuntimeBinDir)\opt$(ExeExt) - <_MonoRuntimeArtifacts Condition="'$(MonoAOTBundleLLVMOptimizer)' == 'true'" Include="$(MonoAOTLLVMDir)\bin\llc"> - $(RuntimeBinDir)cross\$(PackageRID)\llc + <_MonoRuntimeArtifacts Condition="'$(MonoAOTBundleLLVMOptimizer)' == 'true'" Include="$(MonoAOTLLVMDir)\bin\llc$(ExeExt)"> + $(RuntimeBinDir)cross\$(PackageRID)\llc$(ExeExt) - <_MonoRuntimeArtifacts Condition="'$(MonoAOTBundleLLVMOptimizer)' == 'true'" Include="$(MonoAOTLLVMDir)\bin\opt"> - $(RuntimeBinDir)cross\$(PackageRID)\opt + <_MonoRuntimeArtifacts Condition="'$(MonoAOTBundleLLVMOptimizer)' == 'true'" Include="$(MonoAOTLLVMDir)\bin\opt$(ExeExt)"> + $(RuntimeBinDir)cross\$(PackageRID)\opt$(ExeExt) <_MonoIncludeArtifacts Include="$(MonoObjDir)out\include\**" /> <_MonoRuntimeArtifacts Condition="'$(_MonoIncludeInterpStaticFiles)' == 'true'" Include="$(MonoObjDir)out\lib\libmono-ee-interp.a"> diff --git a/src/mono/mono/mini/CMakeLists.txt b/src/mono/mono/mini/CMakeLists.txt index a88d31ecccab43..8cc631c28d0868 100644 --- a/src/mono/mono/mini/CMakeLists.txt +++ b/src/mono/mono/mini/CMakeLists.txt @@ -26,7 +26,7 @@ include(../eglib/CMakeLists.txt) include(../utils/CMakeLists.txt) include(../metadata/CMakeLists.txt) include(../sgen/CMakeLists.txt) -if(TARGET_WIN32) # TODO: hook up HAVE_SYS_ZLIB instead +if(HOST_WIN32) # TODO: hook up HAVE_SYS_ZLIB instead include(../zlib/CMakeLists.txt) endif() diff --git a/src/mono/mono/mini/mini-llvm.c b/src/mono/mono/mini/mini-llvm.c index 02c2cfe845e494..b900bc7d97d14d 100644 --- a/src/mono/mono/mini/mini-llvm.c +++ b/src/mono/mono/mini/mini-llvm.c @@ -12001,6 +12001,9 @@ MonoCPUFeatures mono_llvm_get_cpu_features (void) { "crc", MONO_CPU_ARM64_CRC }, { "crypto", MONO_CPU_ARM64_CRYPTO }, { "neon", MONO_CPU_ARM64_ADVSIMD } +#endif +#if defined(TARGET_WASM) + { "simd", MONO_CPU_WASM_SIMD }, #endif }; if (!cpu_features) diff --git a/src/mono/mono/tools/offsets-tool/clang/cindex.py b/src/mono/mono/tools/offsets-tool/clang/cindex.py index 8e5a9fe00683d4..44c6f49096f495 100644 --- a/src/mono/mono/tools/offsets-tool/clang/cindex.py +++ b/src/mono/mono/tools/offsets-tool/clang/cindex.py @@ -3436,13 +3436,13 @@ def cursor(self): [Cursor], bool), - ("clang_CXXRecord_isAbstract", - [Cursor], - bool), + #("clang_CXXRecord_isAbstract", + # [Cursor], + # bool), - ("clang_EnumDecl_isScoped", - [Cursor], - bool), + #("clang_EnumDecl_isScoped", + # [Cursor], + # bool), ("clang_defaultDiagnosticDisplayOptions", [], @@ -3854,10 +3854,10 @@ def cursor(self): Type, Type.from_result), - ("clang_getTypedefName", - [Type], - _CXString, - _CXString.from_result), + #("clang_getTypedefName", + # [Type], + # _CXString, + # _CXString.from_result), ("clang_getTypeKindSpelling", [c_uint], diff --git a/src/mono/mono/tools/offsets-tool/offsets-tool.py b/src/mono/mono/tools/offsets-tool/offsets-tool.py index c9bfec16909117..5faf2a679c55f0 100644 --- a/src/mono/mono/tools/offsets-tool/offsets-tool.py +++ b/src/mono/mono/tools/offsets-tool/offsets-tool.py @@ -75,7 +75,7 @@ def require_emscipten_path (args): if not os.path.isfile (args.target_path + "/config.h"): print ("File '" + args.target_path + "/config.h' doesn't exist.", file=sys.stderr) sys.exit (1) - + self.sys_includes=[] self.target = None self.target_args = [] @@ -209,7 +209,7 @@ def run_clang(self): args.mono_path + "/mono", args.mono_path + "/mono/eglib", args.target_path, - args.target_path + "/mono/eglib" + args.target_path + "mono/eglib" ] self.basic_types = ["gint8", "gint16", "gint32", "gint64", "float", "double", "gpointer"] diff --git a/src/mono/mono/utils/CMakeLists.txt b/src/mono/mono/utils/CMakeLists.txt index 466a5e50201d91..115570cf39df45 100644 --- a/src/mono/mono/utils/CMakeLists.txt +++ b/src/mono/mono/utils/CMakeLists.txt @@ -6,7 +6,7 @@ set(utils_win32_sources os-event-win32.c w32subset.h) -if(TARGET_WIN32 AND TARGET_AMD64) +if(HOST_WIN32 AND HOST_AMD64) enable_language(ASM_MASM) set(CMAKE_ASM_MASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreaded "") set(CMAKE_ASM_MASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL "") diff --git a/src/mono/mono/utils/mono-dl.c b/src/mono/mono/utils/mono-dl.c index 19c28cf1340ffb..eec013399de3af 100644 --- a/src/mono/mono/utils/mono-dl.c +++ b/src/mono/mono/utils/mono-dl.c @@ -21,7 +21,8 @@ #include #include #include -#ifdef TARGET_ANDROID + +#if defined(TARGET_ANDROID) && !defined(WIN32) #include #endif @@ -180,7 +181,8 @@ fix_libc_name (const char *name) MonoDl* mono_dl_open_self (char **error_msg) { -#ifdef TARGET_ANDROID + +#if defined(TARGET_ANDROID) && !defined(WIN32) MonoDl *module; if (error_msg) *error_msg = NULL; diff --git a/src/mono/mono/utils/mono-threads-coop.c b/src/mono/mono/utils/mono-threads-coop.c index 9d7bf8797eb7ee..e1e80844b1548e 100644 --- a/src/mono/mono/utils/mono-threads-coop.c +++ b/src/mono/mono/utils/mono-threads-coop.c @@ -201,7 +201,8 @@ copy_stack_data_internal (MonoThreadInfo *info, MonoStackData *stackdata_begin, #ifdef _MSC_VER typedef void (*CopyStackDataFunc)(MonoThreadInfo *, MonoStackData *, gconstpointer, gconstpointer); -#ifdef TARGET_AMD64 +#ifdef HOST_AMD64 +#include // Implementation of __builtin_unwind_init under MSVC, dumping nonvolatile registers into MonoBuiltinUnwindInfo. typedef struct { __m128d fregs [10]; diff --git a/src/mono/monoaotcross.proj b/src/mono/monoaotcross.proj index 64390f973183bf..2db55ced33b778 100644 --- a/src/mono/monoaotcross.proj +++ b/src/mono/monoaotcross.proj @@ -11,7 +11,8 @@ <_MonoCrossAOTTargetOS Condition="$(_MonoGenerateOffsetsOSGroups.contains('+browser+'))">$(_MonoCrossAOTTargetOS)+browser+ <_MonoCrossAOTTargetOS Condition="$(_MonoGenerateOffsetsOSGroups.contains('+tvos+'))">$(_MonoCrossAOTTargetOS)+tvos+ <_MonoCrossAOTTargetOS Condition="$(_MonoGenerateOffsetsOSGroups.contains('+ios+'))">$(_MonoCrossAOTTargetOS)+ios+ - $(MonoAotTargets);Android-x64;Android-arm64;Android-x86;Android-arm + $(MonoAotTargets);Android-x64;Android-arm64;Android-x86;Android-arm + $(MonoAotTargets);Android-x64 $(MonoAotTargets);Browser-wasm $(MonoAotTargets);tvOS-x64;tvOS-arm64 $(MonoAotTargets);iOS-x64;iOS-arm64;iOS-x86;iOS-arm