For now, this only adds Android x64. arm, arm64 & x86 will need to come later.
[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,
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"
- ${{ 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:
# 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') }}:
# 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
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:
- Linux_x64
# - Linux_arm64
# - Linux_musl_arm64
- # - windows_x64
+ - Windows_x64
# - windows_x86
# - windows_arm
# - windows_arm64
<PropertyGroup>
<_MonoCrossAOTTargetOS Condition="'$(MonoCrossAOTTargetOS)' != ''">+$(MonoCrossAOTTargetOS.ToLowerInvariant())+</_MonoCrossAOTTargetOS>
- <MonoAotTargets Condition="$(_MonoCrossAOTTargetOS.contains('+android+'))">$(MonoAotTargets);android-x64;android-arm64;android-x86;android-arm</MonoAotTargets>
+ <MonoAotTargets Condition="$(_MonoCrossAOTTargetOS.contains('+android+')) and '$(OS)' != 'Windows_NT'">$(MonoAotTargets);android-x64;android-arm64;android-x86;android-arm</MonoAotTargets>
+ <MonoAotTargets Condition="$(_MonoCrossAOTTargetOS.contains('+android+')) and '$(OS)' == 'Windows_NT'">$(MonoAotTargets);android-x64</MonoAotTargets>
<MonoAotTargets Condition="$(_MonoCrossAOTTargetOS.contains('+browser+'))">$(MonoAotTargets);browser-wasm</MonoAotTargets>
<MonoAotTargets Condition="$(_MonoCrossAOTTargetOS.contains('+tvos+'))">$(MonoAotTargets);tvos-x64;tvos-arm64</MonoAotTargets>
<MonoAotTargets Condition="$(_MonoCrossAOTTargetOS.contains('+ios+'))">$(MonoAotTargets);ios-x64;ios-arm64;ios-x86;ios-arm</MonoAotTargets>
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()
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)
<PropertyGroup>
<MonoCrossDir Condition="'$(MonoCrossDir)' == '' and '$(ROOTFS_DIR)' != ''">$(ROOTFS_DIR)</MonoCrossDir>
<MonoForceInterpreter Condition="'$(MonoForceInterpreter)' == ''">false</MonoForceInterpreter>
+ <ExeExt Condition="'$(OS)' == 'Windows_NT'">.exe</ExeExt>
<ScriptExt Condition="'$(OS)' == 'Windows_NT'">.cmd</ScriptExt>
<ScriptExt Condition="'$(OS)' != 'Windows_NT'">.sh</ScriptExt>
<CoreClrFileName Condition="'$(TargetsWindows)' == 'true'">coreclr.dll</CoreClrFileName>
<_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)" />
</ItemGroup>
<MonoLibClang Condition="!$([MSBuild]::IsOSPlatform('OSX'))">$(EMSDK_PATH)/upstream/lib/libclang.so</MonoLibClang>
</PropertyGroup>
+ <!-- Windows specific options -->
+ <ItemGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
+ <_MonoAOTCPPFLAGS Include="-DHOST_WIN32" />
+ <_MonoAOTCPPFLAGS Include="-D__WIN32__" />
+ <_MonoAOTCPPFLAGS Include="-DWIN32" />
+ <_MonoAOTCPPFLAGS Include="-DWIN32_LEAN_AND_MEAN" />
+ <!--<_MonoAOTCPPFLAGS Include="-D_WINDOWS" />--> <!-- set in monow.vcxproj, not sure we really need it -->
+ <_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__default_codegen__" /> --> <!-- doesn't seem to be used -->
+ <_MonoAOTCPPFLAGS Include="-D_CRT_SECURE_NO_WARNINGS" />
+ <_MonoAOTCPPFLAGS Include="-D_CRT_NONSTDC_NO_DEPRECATE" />
+ <!--<_MonoAOTCPPFLAGS Include="-DGC_NOT_DLL" />--> <!-- only used for Boehm -->
+ <_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" />
+
+ <MonoAOTCMakeArgs Include="-DDISABLE_INTERPRETER=1" />
+
+ <!-- Select generator platform for VS generator -->
+ <MonoAOTCMakeArgs Condition="'$(_MonoUseNinja)' != 'true' and '$(Platform)' == 'x64'" Include="-A x64" />
+ <MonoAOTCMakeArgs Condition="'$(_MonoUseNinja)' != 'true' and '$(Platform)' == 'x86'" Include="-A Win32" />
+ <MonoAOTCMakeArgs Condition="'$(_MonoUseNinja)' != 'true' and '$(Platform)' == 'arm'" Include="-A ARM" />
+ <MonoAOTCMakeArgs Condition="'$(_MonoUseNinja)' != 'true' and '$(Platform)' == 'arm64'" Include="-A ARM64" />
+ </ItemGroup>
+
<!-- Android specific options -->
<PropertyGroup Condition="'$(TargetsAndroid)' == 'true'">
<MonoUseCrossTool>true</MonoUseCrossTool>
<PropertyGroup>
<MonoLibClang Condition="$([MSBuild]::IsOSPlatform('OSX')) and '$(MonoLibClang)' == ''">$(XcodeDir)/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib</MonoLibClang>
<MonoLibClang Condition="$([MSBuild]::IsOSPlatform('Linux')) and '$(MonoLibClang)' == ''">$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/linux-x86_64/lib64/libclang.so.9svn</MonoLibClang>
+ <MonoLibClang Condition="'$(OS)' == 'Windows_NT' and '$(MonoLibClang)' == ''">c:/dev/LLVM/bin/libclang.dll</MonoLibClang>
<MonoAotCMakeSysroot Condition="'$(MonoAotCMakeSysroot)' == ''">$(MonoCrossDir)</MonoAotCMakeSysroot>
</PropertyGroup>
<ItemGroup Condition="'$(MonoUseCrossTool)' == 'true'">
<MonoAotCrossOffsetsToolParams Include="--abi=$(MonoAotAbi)" />
<MonoAotCrossOffsetsToolParams Include="--netcore" />
<MonoAotCrossOffsetsToolParams Include="--targetdir="$(MonoObjDir)"" />
- <MonoAotCrossOffsetsToolParams Include="--monodir="$(MonoProjectRoot)"" />
+ <MonoAotCrossOffsetsToolParams Include="--monodir="$(MonoProjectRoot.TrimEnd('\/'))"" />
<MonoAotCrossOffsetsToolParams Include="--outfile="$(MonoAotOffsetsFile)"" />
<MonoAotCrossOffsetsToolParams Include="--libclang="$(MonoLibClang)"" />
<MonoAotCrossOffsetsToolParams Condition="'$(MonoAotOffsetsPrefix)' != ''" Include="--prefix="$(MonoAotOffsetsPrefix)"" />
</ItemGroup>
<PropertyGroup>
- <_MonoAOTCFLAGSOption>-DCMAKE_C_FLAGS="@(_MonoAOTCFLAGS, ' ')"</_MonoAOTCFLAGSOption>
- <_MonoAOTCXXFLAGSOption>-DCMAKE_CXX_FLAGS="@(_MonoAOTCXXFLAGS, ' ')"</_MonoAOTCXXFLAGSOption>
+ <_MonoAOTCFLAGSOption>-DCMAKE_C_FLAGS="@(_MonoAOTCPPFLAGS, ' ') @(_MonoAOTCFLAGS, ' ')"</_MonoAOTCFLAGSOption>
+ <_MonoAOTCXXFLAGSOption>-DCMAKE_CXX_FLAGS="@(_MonoAOTCPPFLAGS, ' ') @(_MonoAOTCXXFLAGS, ' ')"</_MonoAOTCXXFLAGSOption>
</PropertyGroup>
<ItemGroup>
<MonoAOTCMakeArgs Include="-DAOT_TARGET_TRIPLE=$(MonoAotAbi)"/>
<MonoAOTCMakeArgs Condition="'$(_MonoUseNinja)' == 'true'" Include="-G Ninja"/>
- <MonoAOTCMakeArgs Include="-DCMAKE_INSTALL_PREFIX=$([MSBuild]::NormalizeDirectory('$(MonoObjDir)', 'cross', 'out'))"/>
+ <MonoAOTCMakeArgs Include="-DCMAKE_INSTALL_PREFIX=$([MSBuild]::NormalizePath('$(MonoObjDir)', 'cross', 'out'))"/>
<MonoAOTCMakeArgs Include="-DCMAKE_BUILD_TYPE=$(Configuration)"/>
<!-- FIXME: Disable more -->
<MonoAOTCMakeArgs Include="-DENABLE_MINIMAL=" />
<MonoAOTCMakeArgs Include="-DDISABLE_SHARED_LIBS=1" />
<MonoAOTCMakeArgs Include="-DDISABLE_LIBS=1" />
<MonoAOTCMakeArgs Condition="'$(MonoAotOffsetsFile)' != ''" Include="-DAOT_OFFSETS_FILE="$(MonoAotOffsetsFile)"" />
- <MonoAOTCMakeArgs Condition="'$(MonoAOTEnableLLVM)' == 'true'" Include="-DLLVM_PREFIX=$(MonoAOTLLVMDir)" />
+ <MonoAOTCMakeArgs Condition="'$(MonoAOTEnableLLVM)' == 'true'" Include="-DLLVM_PREFIX=$(MonoAOTLLVMDir.TrimEnd('\/'))" />
<MonoAOTCMakeArgs Include="$(_MonoAOTCFLAGSOption)" />
<MonoAOTCMakeArgs Include="$(_MonoAOTCXXFLAGSOption)" />
<!-- Devloop features -->
<!-- thread suspend -->
<MonoAOTCMakeArgs Include="-DGC_SUSPEND=$(MonoThreadSuspend)" />
-
- <!-- Select generator platform for VS generator -->
- <MonoAOTCMakeArgs Condition="'$(OS)' == 'Windows_NT' and '$(_MonoUseNinja)' != 'true' and '$(Platform)' == 'x64'" Include="-A x64" />
- <MonoAOTCMakeArgs Condition="'$(OS)' == 'Windows_NT' and '$(_MonoUseNinja)' != 'true' and '$(Platform)' == 'x86'" Include="-A Win32" />
- <MonoAOTCMakeArgs Condition="'$(OS)' == 'Windows_NT' and '$(_MonoUseNinja)' != 'true' and '$(Platform)' == 'arm'" Include="-A ARM" />
- <MonoAOTCMakeArgs Condition="'$(OS)' == 'Windows_NT' and '$(_MonoUseNinja)' != 'true' and '$(Platform)' == 'arm64'" Include="-A ARM64" />
- </ItemGroup>
+ </ItemGroup>
<PropertyGroup>
<_MonoAotCrossOffsetsCommand Condition="'$(MonoUseCrossTool)' == 'true'">python3 $(MonoProjectRoot)mono/tools/offsets-tool/offsets-tool.py @(MonoAotCrossOffsetsToolParams, ' ')</_MonoAotCrossOffsetsCommand>
<_MonoAotCMakeConfigureCommand>cmake @(MonoAOTCMakeArgs, ' ') $(MonoProjectRoot)</_MonoAotCMakeConfigureCommand>
+ <_MonoAotCMakeConfigureCommand Condition="'$(OS)' == 'Windows_NT'">set __repoRoot="$(RepoRoot)" && call "$(RepositoryEngineeringDir)native\init-compiler-and-cmake.cmd" $(Platform) && cd /D "$(MonoObjDir)\cross" && @(_MonoBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand)</_MonoAotCMakeConfigureCommand>
<_MonoAotCMakeBuildCommand>cmake --build . --target install --config $(Configuration)</_MonoAotCMakeBuildCommand>
<_MonoAotCMakeBuildCommand Condition="'$(MonoVerboseBuild)' == 'true'">$(_MonoAotCMakeBuildCommand) --verbose</_MonoAotCMakeBuildCommand>
<_MonoAotCMakeBuildCommand Condition="'$(_MonoUseNinja)' != 'true'">$(_MonoAotCMakeBuildCommand) --parallel $([System.Environment]::ProcessorCount)</_MonoAotCMakeBuildCommand>
+ <_MonoAotCMakeBuildCommand Condition="'$(OS)' == 'Windows_NT'">set __repoRoot="$(RepoRoot)" && call "$(RepositoryEngineeringDir)native\init-compiler-and-cmake.cmd" $(Platform) && cd /D "$(MonoObjDir)\cross" && @(_MonoBuildEnv, ' ') $(_MonoAotCMakeBuildCommand)</_MonoAotCMakeBuildCommand>
<_MonoAotPrebuiltOffsetsFile>$(ArtifactsObjDir)\mono\offsetfiles\$(PlatformConfigPathPart)\cross\$([System.IO.Path]::GetFileName('$(MonoAotOffsetsFile)'))</_MonoAotPrebuiltOffsetsFile>
</PropertyGroup>
<_MonoIncludeInterpStaticFiles Condition="'$(TargetsBrowser)' == 'true'">true</_MonoIncludeInterpStaticFiles>
</PropertyGroup>
<PropertyGroup Condition="'$(BuildMonoAOTCrossCompiler)' == 'true'">
- <_MonoAotCrossFilePath>$(MonoObjDir)cross\out\bin\mono-sgen</_MonoAotCrossFilePath>
+ <_MonoAotCrossFilePath>$(MonoObjDir)cross\out\bin\mono-sgen$(ExeExt)</_MonoAotCrossFilePath>
</PropertyGroup>
<!-- Copy Mono runtime files to artifacts directory -->
<Destination>$(RuntimeBinDir)$(MonoStaticFileName)</Destination>
</_MonoRuntimeArtifacts>
<_MonoRuntimeArtifacts Include="$(_MonoAotCrossFilePath)">
- <Destination>$(RuntimeBinDir)cross\$(PackageRID)\mono-aot-cross</Destination>
+ <Destination>$(RuntimeBinDir)cross\$(PackageRID)\mono-aot-cross$(ExeExt)</Destination>
</_MonoRuntimeArtifacts>
- <_MonoRuntimeArtifacts Condition="'$(MonoBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\bin\llc">
- <Destination>$(RuntimeBinDir)\llc</Destination>
+ <_MonoRuntimeArtifacts Condition="'$(MonoBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\bin\llc$(ExeExt)">
+ <Destination>$(RuntimeBinDir)\llc$(ExeExt)</Destination>
</_MonoRuntimeArtifacts>
- <_MonoRuntimeArtifacts Condition="'$(MonoBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\bin\opt">
- <Destination>$(RuntimeBinDir)\opt</Destination>
+ <_MonoRuntimeArtifacts Condition="'$(MonoBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\bin\opt$(ExeExt)">
+ <Destination>$(RuntimeBinDir)\opt$(ExeExt)</Destination>
</_MonoRuntimeArtifacts>
- <_MonoRuntimeArtifacts Condition="'$(MonoAOTBundleLLVMOptimizer)' == 'true'" Include="$(MonoAOTLLVMDir)\bin\llc">
- <Destination>$(RuntimeBinDir)cross\$(PackageRID)\llc</Destination>
+ <_MonoRuntimeArtifacts Condition="'$(MonoAOTBundleLLVMOptimizer)' == 'true'" Include="$(MonoAOTLLVMDir)\bin\llc$(ExeExt)">
+ <Destination>$(RuntimeBinDir)cross\$(PackageRID)\llc$(ExeExt)</Destination>
</_MonoRuntimeArtifacts>
- <_MonoRuntimeArtifacts Condition="'$(MonoAOTBundleLLVMOptimizer)' == 'true'" Include="$(MonoAOTLLVMDir)\bin\opt">
- <Destination>$(RuntimeBinDir)cross\$(PackageRID)\opt</Destination>
+ <_MonoRuntimeArtifacts Condition="'$(MonoAOTBundleLLVMOptimizer)' == 'true'" Include="$(MonoAOTLLVMDir)\bin\opt$(ExeExt)">
+ <Destination>$(RuntimeBinDir)cross\$(PackageRID)\opt$(ExeExt)</Destination>
</_MonoRuntimeArtifacts>
<_MonoIncludeArtifacts Include="$(MonoObjDir)out\include\**" />
<_MonoRuntimeArtifacts Condition="'$(_MonoIncludeInterpStaticFiles)' == 'true'" Include="$(MonoObjDir)out\lib\libmono-ee-interp.a">
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()
{ "crypto", MONO_CPU_ARM64_CRYPTO },
{ "neon", MONO_CPU_ARM64_ADVSIMD }
#endif
+#if defined(TARGET_WASM)
+ { "simd", MONO_CPU_WASM_SIMD },
+#endif
};
if (!cpu_features)
cpu_features = MONO_CPU_INITED | (MonoCPUFeatures)mono_llvm_check_cpu_features (flags_map, G_N_ELEMENTS (flags_map));
[Cursor],
bool),
- ("clang_CXXRecord_isAbstract",
- [Cursor],
- bool),
+ #("clang_CXXRecord_isAbstract",
+ # [Cursor],
+ # bool),
- ("clang_EnumDecl_isScoped",
- [Cursor],
- bool),
+ #("clang_EnumDecl_isScoped",
+ # [Cursor],
+ # bool),
("clang_defaultDiagnosticDisplayOptions",
[],
Type,
Type.from_result),
- ("clang_getTypedefName",
- [Type],
- _CXString,
- _CXString.from_result),
+ #("clang_getTypedefName",
+ # [Type],
+ # _CXString,
+ # _CXString.from_result),
("clang_getTypeKindSpelling",
[c_uint],
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 = []
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"]
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 "")
#include <ctype.h>
#include <string.h>
#include <glib.h>
-#ifdef TARGET_ANDROID
+
+#if defined(TARGET_ANDROID) && !defined(WIN32)
#include <dlfcn.h>
#endif
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;
#ifdef _MSC_VER
typedef void (*CopyStackDataFunc)(MonoThreadInfo *, MonoStackData *, gconstpointer, gconstpointer);
-#ifdef TARGET_AMD64
+#ifdef HOST_AMD64
+#include <emmintrin.h>
// Implementation of __builtin_unwind_init under MSVC, dumping nonvolatile registers into MonoBuiltinUnwindInfo.
typedef struct {
__m128d fregs [10];
<_MonoCrossAOTTargetOS Condition="$(_MonoGenerateOffsetsOSGroups.contains('+browser+'))">$(_MonoCrossAOTTargetOS)+browser+</_MonoCrossAOTTargetOS>
<_MonoCrossAOTTargetOS Condition="$(_MonoGenerateOffsetsOSGroups.contains('+tvos+'))">$(_MonoCrossAOTTargetOS)+tvos+</_MonoCrossAOTTargetOS>
<_MonoCrossAOTTargetOS Condition="$(_MonoGenerateOffsetsOSGroups.contains('+ios+'))">$(_MonoCrossAOTTargetOS)+ios+</_MonoCrossAOTTargetOS>
- <MonoAotTargets Condition="$(_MonoCrossAOTTargetOS.contains('+android+'))">$(MonoAotTargets);Android-x64;Android-arm64;Android-x86;Android-arm</MonoAotTargets>
+ <MonoAotTargets Condition="$(_MonoCrossAOTTargetOS.contains('+android+')) and '$(OS)' != 'Windows_NT'">$(MonoAotTargets);Android-x64;Android-arm64;Android-x86;Android-arm</MonoAotTargets>
+ <MonoAotTargets Condition="$(_MonoCrossAOTTargetOS.contains('+android+')) and '$(OS)' == 'Windows_NT'">$(MonoAotTargets);Android-x64</MonoAotTargets>
<MonoAotTargets Condition="$(_MonoCrossAOTTargetOS.contains('+browser+'))">$(MonoAotTargets);Browser-wasm</MonoAotTargets>
<MonoAotTargets Condition="$(_MonoCrossAOTTargetOS.contains('+tvos+'))">$(MonoAotTargets);tvOS-x64;tvOS-arm64</MonoAotTargets>
<MonoAotTargets Condition="$(_MonoCrossAOTTargetOS.contains('+ios+'))">$(MonoAotTargets);iOS-x64;iOS-arm64;iOS-x86;iOS-arm</MonoAotTargets>