Chromium Code Reviews| Index: SConstruct |
| diff --git a/SConstruct b/SConstruct |
| index aaeec3804bbe9309c726fe815d21ab8a85169cd2..fe355db761b0f6aecd114cf700821012ad7e989b 100755 |
| --- a/SConstruct |
| +++ b/SConstruct |
| @@ -3468,17 +3468,24 @@ nacl_env.AddMethod(RawSyscallObjects) |
| nacl_irt_env.ClearBits('nacl_glibc') |
| nacl_irt_env.ClearBits('nacl_pic') |
| nacl_irt_env.ClearBits('nacl_clang') |
| + |
| # The choice of toolchain used to build the IRT does not depend on the toolchain |
| -# used to build user/test code. The PNaCl toolchain is used on x86, except on |
| -# Windows (because pnacl-clang doesn't run on Windows XP. If we stop supporting |
| -# building on XP, we can remove this exception). See |
| -# https://code.google.com/p/nativeclient/issues/detail?id=3936 |
| -if (nacl_irt_env.Bit('build_mips32') or nacl_irt_env.Bit('build_x86_64') or |
| - (nacl_irt_env.Bit('build_x86_32') and |
| - not nacl_irt_env.Bit('host_windows'))): |
| +# used to build user/test code. PNaCl is used on mips because that's currently |
| +# the only compiler for mips. nacl-clang is used on x86. |
| +if nacl_irt_env.Bit('build_mips32'): |
| nacl_irt_env.SetBits('bitcode') |
| else: |
| nacl_irt_env.ClearBits('bitcode') |
| +if nacl_irt_env.Bit('build_x86_64') or nacl_irt_env.Bit('build_x86_32'): |
| + nacl_irt_env.SetBits('nacl_clang') |
| + # The IRT must be built using LLVM's assembler on x86-64 to preserve sandbox |
| + # base address hiding. It's also use on x86-32 for consistency. |
|
jvoung (off chromium)
2015/03/19 17:36:25
"It's also use on" -> "It's also used on"
or somet
Derek Schuff
2015/03/19 18:36:16
Done.
|
| + nacl_irt_env.Append(CCFLAGS=['-integrated-as']) |
|
jvoung (off chromium)
2015/03/19 17:36:25
Might want to check with Nick about the GN build.
Derek Schuff
2015/03/19 18:36:16
Yeah, my plan was to get this landed for gyp and e
|
| + if nacl_irt_env.Bit('build_x86_32'): |
| + # The x86-32 IRT needs to be callable with an under-aligned stack. |
| + # See https://code.google.com/p/nativeclient/issues/detail?id=3935 |
| + nacl_irt_env.Append(CCFLAGS=['-mstackrealign', '-mno-sse']) |
| + |
| nacl_irt_env.ClearBits('pnacl_generate_pexe') |
|
jvoung (off chromium)
2015/03/19 17:36:25
Maybe these last couple of ClearBits('...') should
Derek Schuff
2015/03/19 18:36:16
Done.
|
| nacl_irt_env.ClearBits('use_sandboxed_translator') |
| nacl_irt_env.Tool('naclsdk') |
| @@ -3519,6 +3526,8 @@ if nacl_irt_env.Bit('bitcode'): |
| # libc++) pthread. |
| nacl_irt_env.Replace(LINK=(nacl_irt_env['LINK']. |
| replace('pnacl-clang++', 'pnacl-clang'))) |
| +nacl_irt_env.Replace(LINK=(nacl_irt_env['LINK']. |
| + replace('nacl-clang++', 'nacl-clang'))) |
| if nacl_irt_env.Bit('bitcode'): |
| nacl_irt_env.Append(LINKFLAGS=['--pnacl-allow-native']) |
|
jvoung (off chromium)
2015/03/19 17:36:24
Could put this under the "3504 if nacl_irt_env.Bit
Derek Schuff
2015/03/19 18:36:16
Done.
|