Skip to content

Commit 38dcc11

Browse files
authored
Re-land #200 : waterfall fastcomp support (#204)
(This was reverted by mistake. It had a bad commit message though, so relanding with a nicer one is nice anyhow.) With this, we can do emsdk install latest-fastcomp and it installs fastcomp from the waterfall. That is, we then have 3 main sdks people might want to use: * latest which installs fastcomp-llvm (plus emscripten etc.) from the mozilla infrastructure. (fetches the last emscripten version there) * latest-upstream which installs upstream-llvm (plus emscripten etc.) from the waterfall infrastructure. (fetches the last known good revision (lkgr) there) * latest-fastcomp which installs fastcomp-llvm (plus emscripten etc.) from the waterfall infrastructure. (fetches the last known good revision (lkgr) there) The first and last are currently somewhat overlapping in that both fetch a build of fastcomp. However, as we transition away from the mozilla infrastructure, we could just make latest an alias for latest-fastcomp. (And later, when we're ready to switch to the wasm backend by default, the alias could switch to latest-upstream.)
1 parent 3ef46e9 commit 38dcc11

File tree

3 files changed

+35
-4
lines changed

3 files changed

+35
-4
lines changed

Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,21 @@ RUN cd /root/ \
99
&& echo "int main() {}" > hello_world.cpp \
1010
&& apt-get update \
1111
&& apt-get install -y python cmake build-essential openjdk-9-jre-headless \
12+
&& /root/emsdk/emsdk update-tags \
13+
&& echo "test latest" \
1214
&& /root/emsdk/emsdk install latest \
1315
&& /root/emsdk/emsdk activate latest \
1416
&& source /root/emsdk/emsdk_env.sh --build=Release \
1517
&& emcc hello_world.cpp \
16-
&& /root/emsdk/emsdk update-tags \
18+
&& echo "test upstream (waterfall)" \
1719
&& /root/emsdk/emsdk install latest-upstream \
1820
&& /root/emsdk/emsdk activate latest-upstream \
1921
&& source /root/emsdk/emsdk_env.sh --build=Release \
20-
&& emcc hello_world.cpp -s WASM_OBJECT_FILES=1
22+
&& emcc hello_world.cpp -s WASM_OBJECT_FILES=1 \
23+
&& echo "test fastcomp (waterfall)" \
24+
&& /root/emsdk/emsdk install latest-fastcomp \
25+
&& /root/emsdk/emsdk activate latest-fastcomp \
26+
&& source /root/emsdk/emsdk_env.sh --build=Release \
27+
&& emcc hello_world.cpp \
28+
&& emcc hello_world.cpp -s WASM=0
2129

emsdk

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,12 +1527,18 @@ def find_latest_nightly_sdk():
15271527
else:
15281528
return find_latest_nightly_32bit_sdk()
15291529

1530-
def find_latest_upstream_sdk():
1530+
def find_latest_waterfall_sdk(which):
15311531
waterfall_lkgr = load_waterfall_lkgr()
15321532
if not waterfall_lkgr:
15331533
print('Failed to find an upstream lkgr')
15341534
sys.exit(1)
1535-
return 'sdk-upstream-%s-64bit' % waterfall_lkgr[0]
1535+
return 'sdk-%s-%s-64bit' % (which, waterfall_lkgr[0])
1536+
1537+
def find_latest_upstream_sdk():
1538+
return find_latest_waterfall_sdk('upstream')
1539+
1540+
def find_latest_fastcomp_sdk():
1541+
return find_latest_waterfall_sdk('fastcomp')
15361542

15371543
# Finds the best-matching python tool for use.
15381544
def find_used_python():
@@ -2225,6 +2231,8 @@ def main():
22252231
sys.argv[i] = str(find_latest_nightly_64bit_sdk())
22262232
elif sys.argv[i] == 'latest-upstream' or sys.argv[i] == 'latest-clang-upstream':
22272233
sys.argv[i] = str(find_latest_upstream_sdk())
2234+
elif sys.argv[i] == 'latest-fastcomp':
2235+
sys.argv[i] = str(find_latest_fastcomp_sdk())
22282236

22292237
if cmd == 'list':
22302238
print('')

emsdk_manifest.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,15 @@
199199
"activated_path": "%installation_dir%/emscripten",
200200
"activated_cfg": "LLVM_ROOT='%installation_dir%/bin';BINARYEN_ROOT='%installation_dir%'"
201201
},
202+
{
203+
"id": "waterfall",
204+
"version": "fastcomp-%waterfall-lkgr%",
205+
"bitness": 64,
206+
"linux_url": "https://storage.googleapis.com/wasm-llvm/builds/linux/%waterfall-lkgr%/wasm-binaries.tbz2",
207+
"install_path": "fastcomp/%waterfall-lkgr%",
208+
"activated_path": "%installation_dir%/emscripten",
209+
"activated_cfg": "LLVM_ROOT='%installation_dir%/fastcomp/bin';BINARYEN_ROOT='%installation_dir%'"
210+
},
202211
{
203212
"id": "clang",
204213
"version": "e1.13.0",
@@ -1549,6 +1558,12 @@
15491558
"uses": ["waterfall-upstream-%waterfall-lkgr%-64bit", "node-8.9.1-64bit"],
15501559
"os": "linux"
15511560
},
1561+
{
1562+
"version": "fastcomp-%waterfall-lkgr%",
1563+
"bitness": 64,
1564+
"uses": ["waterfall-fastcomp-%waterfall-lkgr%-64bit", "node-8.9.1-64bit"],
1565+
"os": "linux"
1566+
},
15521567
{
15531568
"version": "%precompiled_tag32%",
15541569
"bitness": 32,

0 commit comments

Comments
 (0)