From 68b7af05399023cfedefe13965070b477648f54a Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Tue, 27 Aug 2019 08:10:38 -0500 Subject: [PATCH] [wasm] update emscripten --- sdks/builds/emscripten-pr-8457.diff | 23 ++++++++++------------- sdks/builds/wasm.mk | 2 +- tools/offsets-tool-py/offsets-tool.py | 2 +- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/sdks/builds/emscripten-pr-8457.diff b/sdks/builds/emscripten-pr-8457.diff index 0f051a91455..360af836be6 100644 --- a/sdks/builds/emscripten-pr-8457.diff +++ b/sdks/builds/emscripten-pr-8457.diff @@ -1,8 +1,6 @@ -diff --git a/emcc.py b/emcc.py -index c241f396a..1fcffc993 100755 ---- a/emcc.py -+++ b/emcc.py -@@ -844,6 +844,9 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR P +--- a/emcc.py 2019-08-13 20:07:34.000000000 -0500 ++++ b/emcc.py 2019-08-27 08:05:39.000000000 -0500 +@@ -890,6 +890,9 @@ lib_dirs = [shared.path_from_root('system', 'local', 'lib'), shared.path_from_root('system', 'lib')] @@ -12,7 +10,7 @@ index c241f396a..1fcffc993 100755 # find input files this a simple heuristic. we should really analyze # based on a full understanding of gcc params, right now we just assume that # what is left contains no more |-x OPT| things -@@ -869,7 +872,7 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR P +@@ -915,7 +918,7 @@ file_suffix = get_file_suffix(arg) if file_suffix in SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + ASSEMBLY_ENDINGS + HEADER_ENDINGS or shared.Building.is_ar(arg): # we already removed -o , so all these should be inputs newargs[i] = '' @@ -21,16 +19,15 @@ index c241f396a..1fcffc993 100755 input_files.append((i, arg)) has_source_inputs = True elif file_suffix.endswith(HEADER_ENDINGS): -@@ -938,8 +941,6 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR P +@@ -984,7 +987,6 @@ - newargs = [a for a in newargs if a is not ''] + newargs = [a for a in newargs if a != ''] -- # -c means do not link in gcc, and for us, the parallel is to not go all the way to JS, but stop at bitcode - has_dash_c = '-c' in newargs - if has_dash_c: - assert has_source_inputs or has_header_inputs, 'Must have source code or header inputs to use -c' - target = target_basename + '.o' -@@ -1666,7 +1667,7 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR P + has_dash_S = '-S' in newargs + if has_dash_c or has_dash_S: + assert has_source_inputs or has_header_inputs, 'Must have source code or header inputs to use -c or -S' +@@ -1838,7 +1840,7 @@ # First, generate LLVM bitcode. For each input file, we get base.o with bitcode for i, input_file in input_files: file_ending = get_file_suffix(input_file) diff --git a/sdks/builds/wasm.mk b/sdks/builds/wasm.mk index 3e34e1cbaf0..e2cf8e25d4f 100644 --- a/sdks/builds/wasm.mk +++ b/sdks/builds/wasm.mk @@ -1,7 +1,7 @@ #emcc has lots of bash'isms SHELL:=/bin/bash -EMSCRIPTEN_VERSION=1.38.38 +EMSCRIPTEN_VERSION=1.38.42 EMSCRIPTEN_LOCAL_SDK_DIR=$(TOP)/sdks/builds/toolchains/emsdk EMSCRIPTEN_SDK_DIR ?= $(EMSCRIPTEN_LOCAL_SDK_DIR) diff --git a/tools/offsets-tool-py/offsets-tool.py b/tools/offsets-tool-py/offsets-tool.py index caaf1b96f1e..10929bfdcf2 100644 --- a/tools/offsets-tool-py/offsets-tool.py +++ b/tools/offsets-tool-py/offsets-tool.py @@ -80,7 +80,7 @@ class OffsetsTool: if "wasm" in args.abi: require_emscipten_path (args) - self.sys_includes = [args.emscripten_path + "/system/include/libc"] + self.sys_includes = [args.emscripten_path + "/system/include/libc", args.emscripten_path + "/system/lib/libc/musl/arch/emscripten"] self.target = Target ("TARGET_WASM", None, []) self.target_args += ["-target", args.abi] -- 2.11.4.GIT