|
1 | 1 | steps: |
2 | 2 | - task: NodeTool@0 |
3 | 3 | inputs: |
4 | | - versionSpec: "14.x" |
| 4 | + versionSpec: "16.x" |
5 | 5 |
|
6 | 6 | - task: AzureKeyVault@1 |
7 | 7 | displayName: "Azure Key Vault: Get Secrets" |
@@ -87,21 +87,40 @@ steps: |
87 | 87 | set -e |
88 | 88 | export npm_config_arch=$(NPM_ARCH) |
89 | 89 |
|
90 | | - if [ -z "$CC" ] || [ -z "$CXX" ]; then |
91 | | - # Download clang based on chromium revision used by vscode |
92 | | - curl -s https://raw.githubusercontent.com/chromium/chromium/91.0.4472.164/tools/clang/scripts/update.py | python - --output-dir=$PWD/.build/CR_Clang --host-os=linux |
93 | | - # Download libcxx headers and objects from upstream electron releases |
94 | | - DEBUG=libcxx-fetcher \ |
95 | | - VSCODE_LIBCXX_OBJECTS_DIR=$PWD/.build/libcxx-objects \ |
96 | | - VSCODE_LIBCXX_HEADERS_DIR=$PWD/.build/libcxx_headers \ |
97 | | - VSCODE_LIBCXXABI_HEADERS_DIR=$PWD/.build/libcxxabi_headers \ |
98 | | - VSCODE_ARCH="$(NPM_ARCH)" \ |
99 | | - node build/linux/libcxx-fetcher.js |
100 | | - # Set compiler toolchain |
101 | | - export CC=$PWD/.build/CR_Clang/bin/clang |
102 | | - export CXX=$PWD/.build/CR_Clang/bin/clang++ |
103 | | - export CXXFLAGS="-nostdinc++ -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -D__NO_INLINE__ -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit" |
104 | | - export LDFLAGS="-stdlib=libc++ -fuse-ld=lld -flto=thin -fsplit-lto-unit -L$PWD/.build/libcxx-objects -lc++abi" |
| 90 | + # Download clang based on chromium revision used by vscode |
| 91 | + curl -s https://raw.githubusercontent.com/chromium/chromium/96.0.4664.110/tools/clang/scripts/update.py | python - --output-dir=$PWD/.build/CR_Clang --host-os=linux |
| 92 | + # Download libcxx headers and objects from upstream electron releases |
| 93 | + DEBUG=libcxx-fetcher \ |
| 94 | + VSCODE_LIBCXX_OBJECTS_DIR=$PWD/.build/libcxx-objects \ |
| 95 | + VSCODE_LIBCXX_HEADERS_DIR=$PWD/.build/libcxx_headers \ |
| 96 | + VSCODE_LIBCXXABI_HEADERS_DIR=$PWD/.build/libcxxabi_headers \ |
| 97 | + VSCODE_ARCH="$(NPM_ARCH)" \ |
| 98 | + node build/linux/libcxx-fetcher.js |
| 99 | + # Set compiler toolchain |
| 100 | + # Flags for the client build are based on |
| 101 | + # https://source.chromium.org/chromium/chromium/src/+/refs/tags/96.0.4664.110:build/config/arm.gni |
| 102 | + # https://source.chromium.org/chromium/chromium/src/+/refs/tags/96.0.4664.110:build/config/compiler/BUILD.gn |
| 103 | + # https://source.chromium.org/chromium/chromium/src/+/refs/tags/96.0.4664.110:build/config/c++/BUILD.gn |
| 104 | + export CC=$PWD/.build/CR_Clang/bin/clang |
| 105 | + export CXX=$PWD/.build/CR_Clang/bin/clang++ |
| 106 | + export CXXFLAGS="-nostdinc++ -D__NO_INLINE__ -isystem$PWD/.build/libcxx_headers -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit" |
| 107 | + export CFLAGS="-nostdinc++ -D__NO_INLINE__ -isystem$PWD/.build/libcxx_headers -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit" |
| 108 | + export LDFLAGS="-stdlib=libc++ -fuse-ld=lld -flto=thin -fsplit-lto-unit -L$PWD/.build/libcxx-objects -lc++abi" |
| 109 | +
|
| 110 | + if [ "$VSCODE_ARCH" == "arm64" ]; then |
| 111 | + export CXXFLAGS="${CXXFLAGS} --target=aarch64-linux-gnu -fwhole-program-vtables" |
| 112 | + export CFLAGS="${CFLAGS} --target=aarch64-linux-gnu -fwhole-program-vtables" |
| 113 | + export LDFLAGS="${LDFLAGS} --target=aarch64-linux-gnu -march=arm64 -fwhole-program-vtables" |
| 114 | + export VSCODE_REMOTE_CC=/usr/bin/aarch64-linux-gnu-gcc |
| 115 | + export VSCODE_REMOTE_CXX=/usr/bin/aarch64-linux-gnu-g++ |
| 116 | + fi |
| 117 | +
|
| 118 | + if [ "$VSCODE_ARCH" == "armhf" ]; then |
| 119 | + export CXXFLAGS="${CXXFLAGS} --target=arm-linux-gnueabihf -march=armv7-a -mthumb -mfloat-abi=hard -mfpu=neon -mtune=generic-armv7-a" |
| 120 | + export CFLAGS="${CFLAGS} --target=arm-linux-gnueabihf -march=armv7-a -mthumb -mfloat-abi=hard -mfpu=neon -mtune=generic-armv7-a" |
| 121 | + export LDFLAGS="${LDFLAGS} --target=arm-linux-gnueabihf -march=armv7-a" |
| 122 | + export VSCODE_REMOTE_CC=/usr/bin/arm-linux-gnueabihf-gcc |
| 123 | + export VSCODE_REMOTE_CXX=/usr/bin/arm-linux-gnueabihf-g++ |
105 | 124 | fi |
106 | 125 |
|
107 | 126 | for i in {1..3}; do # try 3 times, for Terrapin |
|
0 commit comments