-
Notifications
You must be signed in to change notification settings - Fork 189
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
[NativeAOT-LLVM] Build on Linux #2574
Changes from all commits
68c98bc
7f4de79
6198eee
91fa499
9ae54c2
ef6cdaa
b4df762
500a55d
6d3ca37
ba2d7af
d08e915
65ba66a
bc6f595
36250d2
d6e968b
14724d5
49a8d0e
88f45f8
e860a5d
f1d8712
e1adb5a
342e14e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
param( | ||
$InstallDir | ||
) | ||
|
||
$ErrorActionPreference="Stop" | ||
|
||
New-Item -ItemType Directory -Force -Path $InstallDir | ||
|
||
Set-Location -Path $InstallDir | ||
|
||
git clone https://github.com/emscripten-core/emsdk.git | ||
|
||
Set-Location -Path emsdk | ||
|
||
# Checkout a specific commit to avoid unexpected issues | ||
git checkout 37b85e9 | ||
|
||
./emsdk install 3.1.47 | ||
|
||
./emsdk activate 3.1.47 | ||
|
||
# Set a variable for later use (used in common/build.ps1) | ||
Write-Host "##vso[task.setvariable variable=NATIVEAOT_CI_WASM_BUILD_EMSDK_PATH]$PWD" |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,21 @@ | ||
$InstallPath = $Args[0] | ||
$NodeJSVersion = "v20.2.0" | ||
$NodeJSInstallName = "node-$NodeJSVersion-win-x64" | ||
$NodeJSZipName = "$NodeJSInstallName.zip" | ||
|
||
if (!(Test-Path variable:global:IsWindows)) | ||
{ | ||
$IsWindows = [Environment]::OSVersion.Platform -eq [PlatformID]::Win32NT | ||
} | ||
|
||
if ($IsWIndows) | ||
{ | ||
$NodeJSInstallName = "node-$NodeJSVersion-win-x64" | ||
$NodeJSZipName = "$NodeJSInstallName.zip" | ||
} | ||
else | ||
{ | ||
$NodeJSInstallName = "node-$NodeJSVersion-linux-x64" | ||
$NodeJSZipName = "$NodeJSInstallName.tar.xz" | ||
} | ||
|
||
if (!(Test-Path $InstallPath)) | ||
{ | ||
|
@@ -33,9 +47,17 @@ if ($RetryCount -le 0) | |
exit 1 | ||
} | ||
|
||
Expand-Archive -LiteralPath "$InstallPath\$NodeJSInstallName.zip" -DestinationPath $InstallPath -Force | ||
if ($IsWindows) | ||
{ | ||
Expand-Archive -LiteralPath "$InstallPath\$NodeJSZipName" -DestinationPath $InstallPath -Force | ||
$NodeJSExePath = "$InstallPath\$NodeJSInstallName\node.exe" | ||
Comment on lines
+52
to
+53
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. Does 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. It does, but doesn't support 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. And those are our options for linux https://nodejs.org/dist/v9.9.0/ |
||
} | ||
else | ||
{ | ||
tar xJf $InstallPath/$NodeJSZipName -C $InstallPath | ||
$NodeJSExePath = "$InstallPath/$NodeJSInstallName/bin/node" | ||
} | ||
|
||
$NodeJSExePath = "$InstallPath\$NodeJSInstallName\node.exe" | ||
if (!(Test-Path $NodeJSExePath)) | ||
{ | ||
Write-Error "Did not find NodeJS at: '$NodeJSExePath'" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
mkdir -p $1 | ||
|
||
cd $1 | ||
|
||
curl -L -o powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v7.3.12/powershell-7.3.12-linux-x64.tar.gz | ||
|
||
# Create the target folder where powershell will be placed | ||
mkdir powershell7 | ||
|
||
# Expand powershell to the target folder | ||
tar zxf powershell.tar.gz -C powershell7 | ||
|
||
# Set execute permissions | ||
chmod +x powershell7/pwsh | ||
|
||
echo setting PATH | ||
echo ##vso[task.setvariable variable=PATH]$PATH:$1/powershell7 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Save the current PATH because init-vs-env.cmd will add enough to the PATH that calling it twice | ||
# will exceed the command length limit. | ||
set OLD_PATH=%PATH% | ||
call "%RepoRoot%eng\native\init-vs-env.cmd" wasm || exit /b 1 | ||
|
||
call set CMakeDir=%%CMakePath:\cmake.exe=%% | ||
|
||
echo CMakeDir is %CMakeDir% | ||
echo Setting PATH to %OLD_PATH%;%CMakeDir% | ||
echo ##vso[task.setvariable variable=PATH]%OLD_PATH%;%CMakeDir% |
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.
I suspect this will need to be put under
if eq(parameters.hostedOs, 'windows')
, but let's leave that for the next change.