Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM 4.0 #4888

Closed
wants to merge 10 commits into from
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -269,6 +269,7 @@ a license to everyone to use it as detailed in LICENSE.)
* Vilibald Wanča <vilibald@wvi.cz>
* Alex Hixon <alex@alexhixon.com>
* Vladimir Davidovich <thy.ringo@gmail.com>
* Dylan McKay <dylanmckay34@gmail.com>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My email address is now me@dylanmckay.io

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh ok, do you want to submit a PR to this branch, with that change?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, done in #4937

* Christophe Gragnic <cgragnic@netc.fr>
* Murphy McCauley <murphy.mccauley@gmail.com>
* Anatoly Trosinenko <anatoly.trosinenko@gmail.com>
Expand Down
4 changes: 2 additions & 2 deletions emscripten.py
Expand Up @@ -132,9 +132,9 @@ def get_and_parse_backend(infile, settings, temp_files, DEBUG):
backend_args += ['-emscripten-stack-size=%d' % settings['TOTAL_STACK']]
backend_args += ['-O' + str(settings['OPT_LEVEL'])]
if settings['DISABLE_EXCEPTION_CATCHING'] != 1:
backend_args += ['-enable-emscripten-cxx-exceptions']
backend_args += ['-enable-emscripten-cpp-exceptions']
if settings['DISABLE_EXCEPTION_CATCHING'] == 2:
backend_args += ['-emscripten-cxx-exceptions-whitelist=' + ','.join(settings['EXCEPTION_CATCHING_WHITELIST'] or ['fake'])]
backend_args += ['-emscripten-cpp-exceptions-whitelist=' + ','.join(settings['EXCEPTION_CATCHING_WHITELIST'] or ['fake'])]
if settings['ASYNCIFY']:
backend_args += ['-emscripten-asyncify']
backend_args += ['-emscripten-asyncify-functions=' + ','.join(settings['ASYNCIFY_FUNCTIONS'])]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_browser.py
Expand Up @@ -2942,7 +2942,7 @@ def test_pthread_atomics(self):

# Test 64-bit atomics.
def test_pthread_64bit_atomics(self):
self.btest(path_from_root('tests', 'pthread', 'test_pthread_64bit_atomics.cpp'), expected='0', args=['-O3', '-s', 'USE_PTHREADS=2', '--separate-asm', '-s', 'PTHREAD_POOL_SIZE=8'], timeout=30)
self.btest(path_from_root('tests', 'pthread', 'test_pthread_64bit_atomics.cpp'), expected='0', args=['-O3', '-s', 'USE_PTHREADS=2', '--separate-asm', '-s', 'PTHREAD_POOL_SIZE=8'], timeout=90)

# Test 64-bit C++11 atomics.
def test_pthread_64bit_cxx11_atomics(self):
Expand Down
3 changes: 2 additions & 1 deletion tests/test_core.py
Expand Up @@ -5820,7 +5820,8 @@ def test_dead_functions(self):
#include <stdio.h>
extern "C" {
__attribute__((noinline)) int unused(int x) {
return x;
volatile int y = x;
return y;
}
}
int main(int argc, char **argv) {
Expand Down
6 changes: 3 additions & 3 deletions tests/test_other.py
Expand Up @@ -943,8 +943,8 @@ def measure_funcs(filename):
for test_opts, expected_ranges in [
([], {
100: (150, 500),
250: (150, 600),
500: (150, 700),
250: (150, 800),
500: (150, 900),
1000: (200, 1000),
2000: (250, 2000),
5000: (500, 5000),
Expand Down Expand Up @@ -6250,7 +6250,7 @@ def test_llvm_lto(self):
sizes[lto] = os.stat('a.out.js').st_size
print sizes
assert sizes[1] < sizes[0] # lto reduces size
assert sizes[2] > sizes[0] # fake lto is aggressive at increasing code size
assert sizes[2] > sizes[1] # fake lto is aggressive at increasing code size compared to normal LTO
assert sizes[3] not in set([sizes[0], sizes[1], sizes[2]]) # mode 3 is different (deterministic builds means this tests an actual change)

def test_split_memory(self): # make sure multiple split memory chunks get used
Expand Down
6 changes: 5 additions & 1 deletion tests/test_sanity.py
Expand Up @@ -186,7 +186,11 @@ def test_llvm(self):
for y in range(-2, 3):
f = open(path_from_root('tests', 'fake', 'clang'), 'w')
f.write('#!/bin/sh\n')
f.write('echo "clang version %d.%d" 1>&2\n' % (EXPECTED_LLVM_VERSION[0] + x, EXPECTED_LLVM_VERSION[1] + y))
expected_x = EXPECTED_LLVM_VERSION[0] + x
expected_y = EXPECTED_LLVM_VERSION[1] + y
if expected_x < 0 or expected_y < 0: continue # must be a valid llvm version
print EXPECTED_LLVM_VERSION, x, y, expected_x, expected_y
f.write('echo "clang version %d.%d" 1>&2\n' % (expected_x, expected_y))
f.close()
shutil.copyfile(path_from_root('tests', 'fake', 'clang'), path_from_root('tests', 'fake', 'clang++'))
os.chmod(path_from_root('tests', 'fake', 'clang'), stat.S_IREAD | stat.S_IWRITE | stat.S_IEXEC)
Expand Down
2 changes: 1 addition & 1 deletion tools/shared.py
Expand Up @@ -320,7 +320,7 @@ def fix_js_engine(old, new):

# Expectations

EXPECTED_LLVM_VERSION = (3, 9)
EXPECTED_LLVM_VERSION = (4, 0)

actual_clang_version = None

Expand Down