diff --git a/emcc b/emcc index bad118cd0f9a2..45f160396a9f7 100755 --- a/emcc +++ b/emcc @@ -687,7 +687,7 @@ if os.environ.get('EMMAKEN_CXX'): CC_ADDITIONAL_ARGS = shared.COMPILER_OPTS EMMAKEN_CFLAGS = os.environ.get('EMMAKEN_CFLAGS') -if EMMAKEN_CFLAGS: CC_ADDITIONAL_ARGS += shlex.split(EMMAKEN_CFLAGS) +if EMMAKEN_CFLAGS: sys.argv += shlex.split(EMMAKEN_CFLAGS) # ---------------- Utilities --------------- diff --git a/src/parseTools.js b/src/parseTools.js index 1e680fd09be18..655248b339c87 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -462,7 +462,7 @@ function parseParamTokens(params) { // handle 'byval' and 'byval align X'. We store the alignment in 'byVal' byVal = QUANTUM_SIZE; segment.splice(1, 1); - if (segment[1] && segment[1].text === 'nocapture') { + if (segment[1] && (segment[1].text === 'nocapture' || segment[1].text === 'readonly')) { segment.splice(1, 1); } if (segment[1] && segment[1].text === 'align') { @@ -471,7 +471,7 @@ function parseParamTokens(params) { segment.splice(1, 2); } } - if (segment[1] && segment[1].text === 'nocapture') { + if (segment[1] && (segment[1].text === 'nocapture' || segment[1].text === 'readonly')) { segment.splice(1, 1); } if (segment.length == 1) { diff --git a/tests/poppler/configure b/tests/poppler/configure index 75813bc9b77d1..ab650a3096ced 100755 --- a/tests/poppler/configure +++ b/tests/poppler/configure @@ -23051,12 +23051,12 @@ if test "x$GCC" != xyes; then fi case "$enable_compile_warnings" in no) ;; - yes) CXXFLAGS="-Wall -Wno-write-strings -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions -fno-check-new -fno-common $CXXFLAGS" ;; + yes) CXXFLAGS="-Wall -Wno-write-strings -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions -fno-common $CXXFLAGS" ;; kde) CXXFLAGS="-Wnon-virtual-dtor -Wno-long-long -Wundef \ -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align \ -Wconversion -Wall -W -Wpointer-arith \ -Wwrite-strings -O2 -Wformat-security \ - -Wmissing-format-attribute -fno-exceptions -fno-check-new \ + -Wmissing-format-attribute -fno-exceptions \ -fno-common $CXXFLAGS" ;; esac diff --git a/tests/poppler/configure.ac b/tests/poppler/configure.ac index f1217c8e8321a..e492fe4b45854 100644 --- a/tests/poppler/configure.ac +++ b/tests/poppler/configure.ac @@ -610,12 +610,12 @@ if test "x$GCC" != xyes; then fi case "$enable_compile_warnings" in no) ;; - yes) CXXFLAGS="-Wall -Wno-write-strings -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions -fno-check-new -fno-common $CXXFLAGS" ;; + yes) CXXFLAGS="-Wall -Wno-write-strings -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions -fno-common $CXXFLAGS" ;; kde) CXXFLAGS="-Wnon-virtual-dtor -Wno-long-long -Wundef \ -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align \ -Wconversion -Wall -W -Wpointer-arith \ -Wwrite-strings -O2 -Wformat-security \ - -Wmissing-format-attribute -fno-exceptions -fno-check-new \ + -Wmissing-format-attribute -fno-exceptions \ -fno-common $CXXFLAGS" ;; esac diff --git a/tools/shared.py b/tools/shared.py index 90618a97493b8..11fc7fb7481c6 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -272,9 +272,17 @@ def new(*args): EXPECTED_LLVM_VERSION = (3,2) +actual_clang_version = None + +def get_clang_version(): + global actual_clang_version + if actual_clang_version is None: + actual_clang_version = Popen([CLANG, '-v'], stderr=PIPE).communicate()[1].split('\n')[0].split(' ')[2] + return actual_clang_version + def check_clang_version(): - expected = 'clang version ' + '.'.join(map(str, EXPECTED_LLVM_VERSION)) - actual = Popen([CLANG, '-v'], stderr=PIPE).communicate()[1].split('\n')[0] + expected = '.'.join(map(str, EXPECTED_LLVM_VERSION)) + actual = get_clang_version() if expected in actual: return True logging.warning('LLVM version appears incorrect (seeing "%s", expected "%s")' % (actual, expected)) @@ -337,10 +345,10 @@ def find_temp_directory(): # we re-check sanity when the settings are changed) # We also re-check sanity and clear the cache when the version changes -EMSCRIPTEN_VERSION = '1.8.4' +EMSCRIPTEN_VERSION = '1.8.5' def generate_sanity(): - return EMSCRIPTEN_VERSION + '|' + get_llvm_target() + '|' + LLVM_ROOT + return EMSCRIPTEN_VERSION + '|' + get_llvm_target() + '|' + LLVM_ROOT + '|' + get_clang_version() def check_sanity(force=False): try: @@ -1163,7 +1171,8 @@ def llvm_opt(filename, opts, out=None): if type(opts) is int: opts = Building.pick_llvm_opts(opts) #opts += ['-debug-pass=Arguments'] - opts += ['-disable-loop-vectorization', '-disable-slp-vectorization'] + if get_clang_version() == '3.4': + opts += ['-disable-loop-vectorization', '-disable-slp-vectorization'] # llvm 3.4 has these on by default logging.debug('emcc: LLVM opts: ' + str(opts)) target = out or (filename + '.opt.bc') output = Popen([LLVM_OPT, filename] + opts + ['-o', target], stdout=PIPE).communicate()[0]