(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.)
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -9,13 +9,21 @@ RUN cd /root/ \
|
|||||||
&& echo "int main() {}" > hello_world.cpp \
|
&& echo "int main() {}" > hello_world.cpp \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y python cmake build-essential openjdk-9-jre-headless \
|
&& apt-get install -y python cmake build-essential openjdk-9-jre-headless \
|
||||||
|
&& /root/emsdk/emsdk update-tags \
|
||||||
|
&& echo "test latest" \
|
||||||
&& /root/emsdk/emsdk install latest \
|
&& /root/emsdk/emsdk install latest \
|
||||||
&& /root/emsdk/emsdk activate latest \
|
&& /root/emsdk/emsdk activate latest \
|
||||||
&& source /root/emsdk/emsdk_env.sh --build=Release \
|
&& source /root/emsdk/emsdk_env.sh --build=Release \
|
||||||
&& emcc hello_world.cpp \
|
&& emcc hello_world.cpp \
|
||||||
&& /root/emsdk/emsdk update-tags \
|
&& echo "test upstream (waterfall)" \
|
||||||
&& /root/emsdk/emsdk install latest-upstream \
|
&& /root/emsdk/emsdk install latest-upstream \
|
||||||
&& /root/emsdk/emsdk activate latest-upstream \
|
&& /root/emsdk/emsdk activate latest-upstream \
|
||||||
&& source /root/emsdk/emsdk_env.sh --build=Release \
|
&& source /root/emsdk/emsdk_env.sh --build=Release \
|
||||||
&& emcc hello_world.cpp -s WASM_OBJECT_FILES=1
|
&& emcc hello_world.cpp -s WASM_OBJECT_FILES=1 \
|
||||||
|
&& echo "test fastcomp (waterfall)" \
|
||||||
|
&& /root/emsdk/emsdk install latest-fastcomp \
|
||||||
|
&& /root/emsdk/emsdk activate latest-fastcomp \
|
||||||
|
&& source /root/emsdk/emsdk_env.sh --build=Release \
|
||||||
|
&& emcc hello_world.cpp \
|
||||||
|
&& emcc hello_world.cpp -s WASM=0
|
||||||
|
|
||||||
|
|||||||
12
emsdk
12
emsdk
@@ -1527,12 +1527,18 @@ def find_latest_nightly_sdk():
|
|||||||
else:
|
else:
|
||||||
return find_latest_nightly_32bit_sdk()
|
return find_latest_nightly_32bit_sdk()
|
||||||
|
|
||||||
def find_latest_upstream_sdk():
|
def find_latest_waterfall_sdk(which):
|
||||||
waterfall_lkgr = load_waterfall_lkgr()
|
waterfall_lkgr = load_waterfall_lkgr()
|
||||||
if not waterfall_lkgr:
|
if not waterfall_lkgr:
|
||||||
print('Failed to find an upstream lkgr')
|
print('Failed to find an upstream lkgr')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
return 'sdk-upstream-%s-64bit' % waterfall_lkgr[0]
|
return 'sdk-%s-%s-64bit' % (which, waterfall_lkgr[0])
|
||||||
|
|
||||||
|
def find_latest_upstream_sdk():
|
||||||
|
return find_latest_waterfall_sdk('upstream')
|
||||||
|
|
||||||
|
def find_latest_fastcomp_sdk():
|
||||||
|
return find_latest_waterfall_sdk('fastcomp')
|
||||||
|
|
||||||
# Finds the best-matching python tool for use.
|
# Finds the best-matching python tool for use.
|
||||||
def find_used_python():
|
def find_used_python():
|
||||||
@@ -2225,6 +2231,8 @@ def main():
|
|||||||
sys.argv[i] = str(find_latest_nightly_64bit_sdk())
|
sys.argv[i] = str(find_latest_nightly_64bit_sdk())
|
||||||
elif sys.argv[i] == 'latest-upstream' or sys.argv[i] == 'latest-clang-upstream':
|
elif sys.argv[i] == 'latest-upstream' or sys.argv[i] == 'latest-clang-upstream':
|
||||||
sys.argv[i] = str(find_latest_upstream_sdk())
|
sys.argv[i] = str(find_latest_upstream_sdk())
|
||||||
|
elif sys.argv[i] == 'latest-fastcomp':
|
||||||
|
sys.argv[i] = str(find_latest_fastcomp_sdk())
|
||||||
|
|
||||||
if cmd == 'list':
|
if cmd == 'list':
|
||||||
print('')
|
print('')
|
||||||
|
|||||||
@@ -199,6 +199,15 @@
|
|||||||
"activated_path": "%installation_dir%/emscripten",
|
"activated_path": "%installation_dir%/emscripten",
|
||||||
"activated_cfg": "LLVM_ROOT='%installation_dir%/bin';BINARYEN_ROOT='%installation_dir%'"
|
"activated_cfg": "LLVM_ROOT='%installation_dir%/bin';BINARYEN_ROOT='%installation_dir%'"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "waterfall",
|
||||||
|
"version": "fastcomp-%waterfall-lkgr%",
|
||||||
|
"bitness": 64,
|
||||||
|
"linux_url": "https://storage.googleapis.com/wasm-llvm/builds/linux/%waterfall-lkgr%/wasm-binaries.tbz2",
|
||||||
|
"install_path": "fastcomp/%waterfall-lkgr%",
|
||||||
|
"activated_path": "%installation_dir%/emscripten",
|
||||||
|
"activated_cfg": "LLVM_ROOT='%installation_dir%/fastcomp/bin';BINARYEN_ROOT='%installation_dir%'"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "clang",
|
"id": "clang",
|
||||||
"version": "e1.13.0",
|
"version": "e1.13.0",
|
||||||
@@ -1549,6 +1558,12 @@
|
|||||||
"uses": ["waterfall-upstream-%waterfall-lkgr%-64bit", "node-8.9.1-64bit"],
|
"uses": ["waterfall-upstream-%waterfall-lkgr%-64bit", "node-8.9.1-64bit"],
|
||||||
"os": "linux"
|
"os": "linux"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"version": "fastcomp-%waterfall-lkgr%",
|
||||||
|
"bitness": 64,
|
||||||
|
"uses": ["waterfall-fastcomp-%waterfall-lkgr%-64bit", "node-8.9.1-64bit"],
|
||||||
|
"os": "linux"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "%precompiled_tag32%",
|
"version": "%precompiled_tag32%",
|
||||||
"bitness": 32,
|
"bitness": 32,
|
||||||
|
|||||||
Reference in New Issue
Block a user