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 atexit | 6 import atexit |
7 import glob | 7 import glob |
8 import os | 8 import os |
9 import platform | 9 import platform |
10 import shutil | 10 import shutil |
(...skipping 3398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3409 | 3409 |
3410 def NaClSharedLibrary(env, lib_name, *args, **kwargs): | 3410 def NaClSharedLibrary(env, lib_name, *args, **kwargs): |
3411 env_shared = env.Clone(COMPONENT_STATIC=False) | 3411 env_shared = env.Clone(COMPONENT_STATIC=False) |
3412 soname = SCons.Util.adjustixes(lib_name, 'lib', '.so') | 3412 soname = SCons.Util.adjustixes(lib_name, 'lib', '.so') |
3413 env_shared.AppendUnique(SHLINKFLAGS=['-Wl,-soname,%s' % (soname)]) | 3413 env_shared.AppendUnique(SHLINKFLAGS=['-Wl,-soname,%s' % (soname)]) |
3414 return env_shared.ComponentLibrary(lib_name, *args, **kwargs) | 3414 return env_shared.ComponentLibrary(lib_name, *args, **kwargs) |
3415 | 3415 |
3416 nacl_env.AddMethod(NaClSharedLibrary) | 3416 nacl_env.AddMethod(NaClSharedLibrary) |
3417 | 3417 |
3418 def NaClSdkLibrary(env, lib_name, *args, **kwargs): | 3418 def NaClSdkLibrary(env, lib_name, *args, **kwargs): |
3419 gen_shared = not env.Bit('nacl_disable_shared') | |
3420 if 'no_shared_lib' in kwargs: | |
3421 if kwargs['no_shared_lib']: | |
jvoung - send to chromium...
2012/05/22 20:49:40
Can't you still add a arg with a default value, in
Robert Muth (chromium)
2012/05/22 21:16:36
Sadly you cannot mix args that way in python
The o
jvoung - send to chromium...
2012/05/22 23:22:13
Well it worked on a simple example I tried, but th
| |
3422 gen_shared = False | |
3423 del kwargs['no_shared_lib'] | |
3419 n = [env.ComponentLibrary(lib_name, *args, **kwargs)] | 3424 n = [env.ComponentLibrary(lib_name, *args, **kwargs)] |
3420 if not env.Bit('nacl_disable_shared'): | 3425 if gen_shared: |
3421 n.append(NaClSharedLibrary(env, lib_name, *args, **kwargs)) | 3426 n.append(NaClSharedLibrary(env, lib_name, *args, **kwargs)) |
3422 return n | 3427 return n |
3423 | 3428 |
3424 nacl_env.AddMethod(NaClSdkLibrary) | 3429 nacl_env.AddMethod(NaClSdkLibrary) |
3425 | 3430 |
3426 | 3431 |
3427 # --------------------------------------------------------------------- | 3432 # --------------------------------------------------------------------- |
3428 # Special environment for untrusted test binaries that use raw syscalls | 3433 # Special environment for untrusted test binaries that use raw syscalls |
3429 # --------------------------------------------------------------------- | 3434 # --------------------------------------------------------------------- |
3430 def RawSyscallObjects(env, sources): | 3435 def RawSyscallObjects(env, sources): |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3855 nacl_env.ValidateSdk() | 3860 nacl_env.ValidateSdk() |
3856 | 3861 |
3857 if BROKEN_TEST_COUNT > 0: | 3862 if BROKEN_TEST_COUNT > 0: |
3858 msg = "There are %d broken tests." % BROKEN_TEST_COUNT | 3863 msg = "There are %d broken tests." % BROKEN_TEST_COUNT |
3859 if GetOption('brief_comstr'): | 3864 if GetOption('brief_comstr'): |
3860 msg += " Add --verbose to the command line for more information." | 3865 msg += " Add --verbose to the command line for more information." |
3861 print msg | 3866 print msg |
3862 | 3867 |
3863 # separate warnings from actual build output | 3868 # separate warnings from actual build output |
3864 Banner('B U I L D - O U T P U T:') | 3869 Banner('B U I L D - O U T P U T:') |
OLD | NEW |