-
Notifications
You must be signed in to change notification settings - Fork 5k
[wasm coreclr] Make clr.runtime+libs build on Windows #115058
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2fb9362
8b31454
74497ee
1a45542
accc531
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ set __TargetArchArm=0 | |
set __TargetArchArm64=0 | ||
set __TargetArchLoongArch64=0 | ||
set __TargetArchRiscV64=0 | ||
set __TargetArchWasm=0 | ||
|
||
set __BuildTypeDebug=0 | ||
set __BuildTypeChecked=0 | ||
|
@@ -66,6 +67,7 @@ set __UnprocessedBuildArgs= | |
|
||
set __BuildNative=1 | ||
set __RestoreOptData=1 | ||
set __CrossTarget=0 | ||
set __HostOS= | ||
set __HostArch= | ||
set __PgoOptDataPath= | ||
|
@@ -94,6 +96,7 @@ if /i "%1" == "-arm" (set __TargetArchArm=1&shift&goto Arg_Loop) | |
if /i "%1" == "-arm64" (set __TargetArchArm64=1&shift&goto Arg_Loop) | ||
if /i "%1" == "-loongarch64" (set __TargetArchLoongArch64=1&shift&goto Arg_Loop) | ||
if /i "%1" == "-riscv64" (set __TargetArchRiscV64=1&shift&goto Arg_Loop) | ||
if /i "%1" == "-wasm" (set __TargetArchWasm=1&shift&goto Arg_Loop) | ||
|
||
if /i "%1" == "-debug" (set __BuildTypeDebug=1&shift&goto Arg_Loop) | ||
if /i "%1" == "-checked" (set __BuildTypeChecked=1&shift&goto Arg_Loop) | ||
|
@@ -152,6 +155,7 @@ if /i "%1" == "-enforcepgo" (set __EnforcePgo=1&shift&goto Arg_Loop) | |
if /i "%1" == "-pgodatapath" (set __PgoOptDataPath=%~2&set __PgoOptimize=1&shift&shift&goto Arg_Loop) | ||
if /i "%1" == "-component" (set __RequestedBuildComponents=%__RequestedBuildComponents%-%2&set "__remainingArgs=!__remainingArgs:*%2=!"&shift&shift&goto Arg_Loop) | ||
if /i "%1" == "-fsanitize" (set __CMakeArgs=%__CMakeArgs% "-DCLR_CMAKE_ENABLE_SANITIZERS=%2"&shift&shift&goto Arg_Loop) | ||
if /i "%1" == "-keepnativesymbols" (set __CMakeArgs=%__CMakeArgs% "-DCLR_CMAKE_KEEP_NATIVE_SYMBOLS=true"&shift&goto Arg_Loop) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd rather use #114466 for that instead. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This way it is useful when you run the build-runtime scripts directly, to have faster roundtrip of runtime build. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think the batch gods are happy as the build fails locally for me with the ever clear There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How do you call it? It worked fine for me. I will enable windows build on CI to see if it works there. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
REM TODO these are deprecated remove them eventually | ||
REM don't add more, use the - syntax instead | ||
|
@@ -175,7 +179,7 @@ if defined VCINSTALLDIR ( | |
|
||
if defined __BuildAll goto BuildAll | ||
|
||
set /A __TotalSpecifiedTargetArch=__TargetArchX64 + __TargetArchX86 + __TargetArchArm + __TargetArchArm64 + __TargetArchLoongArch64 + __TargetArchRiscV64 | ||
set /A __TotalSpecifiedTargetArch=__TargetArchX64 + __TargetArchX86 + __TargetArchArm + __TargetArchArm64 + __TargetArchLoongArch64 + __TargetArchRiscV64 + __TargetArchWasm | ||
if %__TotalSpecifiedTargetArch% GTR 1 ( | ||
echo Error: more than one build architecture specified, but "all" not specified. | ||
goto Usage | ||
|
@@ -187,6 +191,7 @@ if %__TargetArchArm%==1 set __TargetArch=arm | |
if %__TargetArchArm64%==1 set __TargetArch=arm64 | ||
if %__TargetArchLoongArch64%==1 set __TargetArch=loongarch64 | ||
if %__TargetArchRiscV64%==1 set __TargetArch=riscv64 | ||
if %__TargetArchWasm%==1 set __TargetArch=wasm | ||
if "%__HostArch%" == "" set __HostArch=%__TargetArch% | ||
|
||
set /A __TotalSpecifiedBuildType=__BuildTypeDebug + __BuildTypeChecked + __BuildTypeRelease | ||
|
@@ -281,7 +286,14 @@ REM ============================================================================ | |
|
||
@if defined _echo @echo on | ||
|
||
if not "%__TargetOS%"=="android" ( | ||
if "%__TargetOS%"=="android" ( | ||
set __CrossTarget=1 | ||
) | ||
if "%__TargetOS%"=="browser" ( | ||
set __CrossTarget=1 | ||
) | ||
|
||
if %__CrossTarget% EQU 0 ( | ||
call "%__RepoRootDir%\eng\native\version\copy_version_files.cmd" | ||
) else ( | ||
call powershell -NoProfile -ExecutionPolicy ByPass -File "%__RepoRootDir%\eng\native\version\copy_version_files.ps1" | ||
|
@@ -486,7 +498,7 @@ REM ============================================================================ | |
|
||
set __TargetArchList= | ||
|
||
set /A __TotalSpecifiedTargetArch=__TargetArchX64 + __TargetArchX86 + __TargetArchArm + __TargetArchArm64 + __TargetArchLoongArch64 + __TargetArchRiscV64 | ||
set /A __TotalSpecifiedTargetArch=__TargetArchX64 + __TargetArchX86 + __TargetArchArm + __TargetArchArm64 + __TargetArchLoongArch64 + __TargetArchRiscV64 + __TargetArchWasm | ||
if %__TotalSpecifiedTargetArch% EQU 0 ( | ||
REM Nothing specified means we want to build all architectures. | ||
set __TargetArchList=x64 x86 arm arm64 | ||
|
@@ -504,6 +516,7 @@ if %__TargetArchArm%==1 set __TargetArchList=%__TargetArchList% arm | |
if %__TargetArchArm64%==1 set __TargetArchList=%__TargetArchList% arm64 | ||
if %__TargetArchLoongArch64%==1 set __TargetArchList=%__TargetArchList% loongarch64 | ||
if %__TargetArchRiscV64%==1 set __TargetArchList=%__TargetArchList% riscv64 | ||
if %__TargetArchWasm%==1 set __TargetArchList=%__TargetArchList% wasm | ||
|
||
set __BuildTypeList= | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this needed? I think we should be using emscripten here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I run
build.cmd -os browser
, theCLR_CMAKE_TARGET_OS
is set tobrowser
. Where isCLR_CMAKE_TARGET_OS
set toemscripten
? Maybe we should make it work similar on coreclr then?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The emscripten toolchain sets
CMAKE_SYSTEM_NAME
to 'emscripten' andCLR_CMAKE_HOST_OS
will pick that up by default. In mono, we aren't fully integrated withconfigureplatform.cmake
and so we don't passCLR_CMAKE_TARGET_OS
like coreclr does. If it's not specified, it'll take the value ofCLR_CMAKE_HOST_OS
and that is 'emscripten'.I think it might be better to set
CLR_CMAKE_TARGET_OS
to 'browser' in mono and let coreclr act normally.