aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xemcc2
-rw-r--r--src/parseTools.js6
-rwxr-xr-xtests/poppler/configure4
-rw-r--r--tests/poppler/configure.ac4
-rw-r--r--tools/shared.py18
5 files changed, 22 insertions, 12 deletions
diff --git a/emcc b/emcc
index f1b7dc5d..00cf3f06 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 cef25ed4..4d6d7bd3 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -463,7 +463,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') {
@@ -472,7 +472,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) {
@@ -628,7 +628,7 @@ function parseLLVMSegment(segment) {
}
function cleanSegment(segment) {
- while (segment.length >= 2 && ['noalias', 'sret', 'nocapture', 'nest', 'zeroext', 'signext'].indexOf(segment[1].text) != -1) {
+ while (segment.length >= 2 && ['noalias', 'sret', 'nocapture', 'nest', 'zeroext', 'signext', 'readnone'].indexOf(segment[1].text) != -1) {
segment.splice(1, 1);
}
return segment;
diff --git a/tests/poppler/configure b/tests/poppler/configure
index 75813bc9..ab650a30 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 f1217c8e..e492fe4b 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 363b29f9..4ab476d3 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -272,9 +272,17 @@ if EM_POPEN_WORKAROUND and os.name == 'nt':
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.6'
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,6 +1171,8 @@ class Building:
if type(opts) is int:
opts = Building.pick_llvm_opts(opts)
#opts += ['-debug-pass=Arguments']
+ 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]