diff --git a/eng/pipelines/runtime-staging.yml b/eng/pipelines/runtime-staging.yml index 01ee98adb01de..c5fedb7b00e02 100644 --- a/eng/pipelines/runtime-staging.yml +++ b/eng/pipelines/runtime-staging.yml @@ -282,13 +282,13 @@ jobs: - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: debug + buildConfig: release platforms: - Browser_wasm_win jobParameters: testGroup: innerloop nameSuffix: Browser_wasm_Windows - buildArgs: -subset mono+libs /p:RuntimeFlavor=Mono + buildArgs: -subset mono+libs /p:RuntimeFlavor=Mono -c $(_BuildConfig) # # CoreCLR Build for running Apple Silicon libraries-innerloop diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 09848a450c85d..f42855ea469f7 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -19,6 +19,8 @@ .cmd .sh \" + python3 + python coreclr.dll libcoreclr.dylib libcoreclr.dylib @@ -36,13 +38,14 @@ /Applications/Xcode.app/Contents/Developer true true - true + true true true true true true - $([MSBuild]::NormalizePath('$(MonoObjDir)', 'cross', 'config.h')) + $([MSBuild]::NormalizeDirectory('$(MonoObjDir)', 'cross')) + $([MSBuild]::NormalizePath('$(MonoObjCrossDir)', 'config.h')) true true $(Compiler) @@ -408,7 +411,7 @@ <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' != 'true' and '$(_MonoRunInitCompiler)' != 'false' and '$(OS)' == 'Windows_NT'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" $(Platform) && cd /D "$(MonoObjDir)" && @(_MonoBuildEnv, ' ') $(_MonoCMakeConfigureCommand) <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' != 'true' and '$(_MonoRunInitCompiler)' == 'false'">$(_MonoCCOption) $(_MonoCXXOption) @(_MonoBuildEnv, ' ') $(_MonoCMakeConfigureCommand) <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' == 'true' and '$(OS)' != 'Windows_NT'">bash -c 'source $(EMSDK_PATH)/emsdk_env.sh 2>&1 && emcmake $(_MonoCMakeConfigureCommand)' - <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' == 'true' and '$(OS)' == 'Windows_NT'">call "$(EMSDK_PATH)emsdk_env.bat" && emcmake $(_MonoCMakeConfigureCommand) + <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' == 'true' and '$(OS)' == 'Windows_NT'">call "$([MSBuild]::NormalizePath('$(EMSDK_PATH)', 'emsdk_env.bat'))" && emcmake $(_MonoCMakeConfigureCommand) <_MonoCMakeBuildCommand>cmake --build . --target install --config $(Configuration) <_MonoCMakeBuildCommand Condition="'$(MonoVerboseBuild)' == 'true'">$(_MonoCMakeBuildCommand) --verbose @@ -437,7 +440,7 @@ $(XcodeDir)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$(iOSVersion).sdk $(XcodeDir)/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS$(tvOSVersion).sdk $(XcodeDir)/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator$(tvOSVersion).sdk - $(MonoObjDir)cross/offsets-$(Platform)-darwin.h + $(MonoObjCrossDir)offsets-$(Platform)-darwin.h aarch64-apple-darwin10 arm-apple-darwin10 i386-apple-darwin10 @@ -450,7 +453,7 @@ true aarch64-linux-gnu - $(MonoObjDir)cross/offsets-aarch-linux-gnu.h + $(MonoObjCrossDir)offsets-aarch-linux-gnu.h $(MonoCrossDir)/usr/lib/gcc/aarch64-linux-gnu/5 @@ -458,9 +461,11 @@ true wasm32-unknown-none - $(MonoObjDir)cross/offsets-wasm32-unknown-none.h + $(MonoObjCrossDir)offsets-wasm32-unknown-none.h $(EMSDK_PATH)/upstream/lib/libclang.dylib - $(EMSDK_PATH)/upstream/lib/libclang.so + $(EMSDK_PATH)/upstream/lib/libclang.so + $([MSBuild]::NormalizePath('$(EMSDK_PATH)', 'upstream', 'bin', 'libclang.dll')) + call "$([MSBuild]::NormalizePath('$(EMSDK_PATH)', 'emsdk_env.bat'))" && python @@ -515,13 +520,13 @@ - + - + @@ -531,7 +536,7 @@ - + @@ -550,28 +555,28 @@ - <_MonoAotCrossOffsetsCommand Condition="'$(MonoUseCrossTool)' == 'true'">python3 $(MonoProjectRoot)mono/tools/offsets-tool/offsets-tool.py @(MonoAotCrossOffsetsToolParams, ' ') + <_MonoAotCrossOffsetsCommand Condition="'$(MonoUseCrossTool)' == 'true'">$(PythonCmd) $(MonoProjectRoot)mono/tools/offsets-tool/offsets-tool.py @(MonoAotCrossOffsetsToolParams, ' ') <_MonoAotCMakeConfigureCommand>cmake @(MonoAOTCMakeArgs, ' ') $(MonoProjectRoot) - <_MonoAotCMakeConfigureCommand Condition="'$(OS)' == 'Windows_NT'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" $(Platform) && cd /D "$(MonoObjDir)\cross" && @(_MonoBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand) + <_MonoAotCMakeConfigureCommand Condition="'$(OS)' == 'Windows_NT'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" $(Platform) && cd /D "$(MonoObjCrossDir)" && @(_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'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" $(Platform) && cd /D "$(MonoObjDir)\cross" && @(_MonoBuildEnv, ' ') $(_MonoAotCMakeBuildCommand) + <_MonoAotCMakeBuildCommand Condition="'$(OS)' == 'Windows_NT'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" $(Platform) && cd /D "$(MonoObjCrossDir)" && @(_MonoBuildEnv, ' ') $(_MonoAotCMakeBuildCommand) <_MonoAotPrebuiltOffsetsFile>$(ArtifactsObjDir)\mono\offsetfiles\$(PlatformConfigPathPart)\cross\$([System.IO.Path]::GetFileName('$(MonoAotOffsetsFile)')) - + - - + + - - + + + Properties="NativeVersionFile=$(MonoObjCrossDir)_version.h;RuntimeVersionFile=$(MonoObjCrossDir)runtime_version.h" /> @@ -611,7 +616,7 @@ <_MonoIncludeIcuFiles Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">true - <_MonoAotCrossFilePath>$(MonoObjDir)cross\out\bin\mono-sgen$(ExeExt) + <_MonoAotCrossFilePath>$(MonoObjCrossDir)out\bin\mono-sgen$(ExeExt) diff --git a/src/mono/mono/tools/offsets-tool/offsets-tool.py b/src/mono/mono/tools/offsets-tool/offsets-tool.py index 5faf2a679c55f..a4e191292354b 100644 --- a/src/mono/mono/tools/offsets-tool/offsets-tool.py +++ b/src/mono/mono/tools/offsets-tool/offsets-tool.py @@ -6,6 +6,7 @@ import sys import argparse import clang.cindex +import platform IOS_DEFINES = ["HOST_DARWIN", "TARGET_MACH", "MONO_CROSS_COMPILE", "USE_MONO_CTX", "_XOPEN_SOURCE"] ANDROID_DEFINES = ["HOST_ANDROID", "MONO_CROSS_COMPILE", "USE_MONO_CTX", "BIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD"] @@ -84,6 +85,8 @@ def require_emscipten_path (args): if "wasm" in args.abi: require_emscipten_path (args) self.sys_includes = [args.emscripten_path + "/system/include", args.emscripten_path + "/system/include/libc", args.emscripten_path + "/system/lib/libc/musl/arch/emscripten"] + if platform.system() == "Windows": + self.sys_includes += [args.emscripten_path + "/system/lib/libc/musl/include", args.emscripten_path + "/system/lib/libc/musl/arch/generic"] self.target = Target ("TARGET_WASM", None, []) self.target_args += ["-target", args.abi] @@ -209,7 +212,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"]