OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 Import('env') | 6 Import('env') |
7 | 7 |
8 # (elijahtaylor): Removing so braced groups will work for GC syscall wrapping. | 8 # (elijahtaylor): Removing so braced groups will work for GC syscall wrapping. |
9 env.FilterOut(CCFLAGS=['-pedantic']) | 9 env.FilterOut(CCFLAGS=['-pedantic']) |
10 | 10 |
11 if env.Bit('bitcode'): | 11 if env.Bit('bitcode'): |
12 # TODO(robertm): get rid of -allow-asm once we can distinguish | 12 # TODO(robertm): get rid of -allow-asm once we can distinguish |
13 # real asms from those used for redirects. | 13 # real asms from those used for redirects. |
14 # In this case: asm("llvm.nacl.tp.tdb.offset") | 14 # In this case: asm("llvm.nacl.tp.tdb.offset") |
15 # from src/untrusted/nacl/tls_params.h | 15 # from src/untrusted/nacl/tls_params.h |
16 env.Append(CCFLAGS=['-allow-asm']) | 16 env.Append(CCFLAGS=['-allow-asm']) |
17 | 17 |
18 if env.Bit('nonsfi_nacl'): | 18 if env.Bit('nonsfi_nacl'): |
19 # Specifying the target arch is necessary for using inline assembly | 19 # Specifying the target arch is necessary for using inline assembly |
20 # in non-SFI code. | 20 # in non-SFI code. |
21 if env.Bit('target_x86_32'): | 21 if env.Bit('build_x86_32'): |
22 env.Append(CCFLAGS=['--target=i686-unknown-nacl']) | 22 env.Append(CCFLAGS=['--target=i686-unknown-nacl']) |
23 elif env.Bit('target_arm'): | 23 elif env.Bit('build_arm'): |
24 env.Append(CCFLAGS=['--target=armv7-unknown-nacl-gnueabihf', | 24 env.Append(CCFLAGS=['--target=armv7-unknown-nacl-gnueabihf', |
25 '-mfloat-abi=hard']) | 25 '-mfloat-abi=hard']) |
26 else: | 26 else: |
27 raise Exception('Unsupported architecture') | 27 raise Exception('Unsupported architecture') |
28 | 28 |
29 valgrind = env.ComponentObject( | 29 valgrind = env.ComponentObject( |
30 'valgrind_annotations.o', | 30 'valgrind_annotations.o', |
31 '${MAIN_DIR}/src/untrusted/valgrind/dynamic_annotations.c') | 31 '${MAIN_DIR}/src/untrusted/valgrind/dynamic_annotations.c') |
32 | 32 |
33 nc_objs = [env.ComponentObject(module, module + '.c') | 33 nc_objs = [env.ComponentObject(module, module + '.c') |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 # installed, we ensure that they are in place before they're used. | 76 # installed, we ensure that they are in place before they're used. |
77 for compiler in ['${CC}', '${CXX}']: | 77 for compiler in ['${CC}', '${CXX}']: |
78 # TODO(mcgrathr): This can't be the best way! Ideally we'd just use | 78 # TODO(mcgrathr): This can't be the best way! Ideally we'd just use |
79 # '${CC}' directly in env.Depends and that should be fine for scons. | 79 # '${CC}' directly in env.Depends and that should be fine for scons. |
80 # But sometimes '${CC}' is not just '.../gcc', it's '.../gcc -m32'. | 80 # But sometimes '${CC}' is not just '.../gcc', it's '.../gcc -m32'. |
81 compiler = env.subst(compiler).split()[0] | 81 compiler = env.subst(compiler).split()[0] |
82 env.Depends(env.WhereIs(compiler), n) | 82 env.Depends(env.WhereIs(compiler), n) |
83 else: | 83 else: |
84 n = [] | 84 n = [] |
85 env.Alias('install_libpthread', n) | 85 env.Alias('install_libpthread', n) |
OLD | NEW |