@@ -34,6 +34,8 @@ import pynacl.platform
3434import gc
3535gc .disable ()
3636
37+ nacltool = False # Daemon: not yet implemented
38+
3739# REPORT
3840CMD_COUNTER = {}
3941ENV_COUNTER = {}
@@ -468,8 +470,8 @@ pre_base_env = Environment(
468470 # This allows in things like externally provided PATH, PYTHONPATH.
469471 ENV = os .environ .copy (),
470472 tools = ['component_setup' ],
471- # SOURCE_ROOT is one leave above the native_client directory.
472- SOURCE_ROOT = Dir ('#/.. ' ).abspath ,
473+ # In upstream this is the "depot" dir (parent dir of repositories)
474+ SOURCE_ROOT = Dir ('#/include-hax ' ).abspath ,
473475 # Publish dlls as final products (to staging).
474476 COMPONENT_LIBRARY_PUBLISH = True ,
475477
@@ -2212,7 +2214,7 @@ Automagically generated help:
22122214
22132215
22142216def SetUpClang (env ):
2215- env ['CLANG_DIR' ] = '${SOURCE_ROOT}/third_party/llvm-build/Release+Asserts /bin'
2217+ env ['CLANG_DIR' ] = '/usr /bin'
22162218 env ['CLANG_OPTS' ] = []
22172219 if env .Bit ('asan' ):
22182220 if not (env .Bit ('host_linux' ) or env .Bit ('host_mac' )):
@@ -2709,8 +2711,8 @@ def MakeGenericLinuxEnv(platform=None):
27092711 sysroot = os .path .join (
27102712 '${SOURCE_ROOT}/build/linux/debian_bullseye_amd64-sysroot' )
27112713 linux_env .Prepend (
2712- CCFLAGS = ['-m64' , '--sysroot=' + sysroot ],
2713- LINKFLAGS = ['-m64' , '--sysroot=' + sysroot ],
2714+ CCFLAGS = ['-m64' ], # , '--sysroot='+sysroot],
2715+ LINKFLAGS = ['-m64' ] # , '--sysroot='+sysroot],
27142716 )
27152717 elif linux_env .Bit ('build_arm' ):
27162718 SetUpLinuxEnvArm (linux_env )
@@ -2796,7 +2798,7 @@ pre_base_env.Append(
27962798nacl_env = MakeArchSpecificEnv ()
27972799# See comment below about libc++ and libpthread in NONIRT_LIBS.
27982800using_nacl_libcxx = nacl_env .Bit ('bitcode' ) or nacl_env .Bit ('nacl_clang' )
2799- nacl_env = nacl_env .Clone (
2801+ if nacltool : nacl_env = nacl_env .Clone (
28002802 tools = ['naclsdk' ],
28012803 NACL_BUILD_FAMILY = 'UNTRUSTED' ,
28022804 BUILD_TYPE = 'nacl' ,
@@ -3136,7 +3138,7 @@ if nacl_env.Bit('running_on_valgrind'):
31363138 nacl_env .Append (LINKFLAGS = ['-Wl,-u,have_nacl_valgrind_interceptors' ],
31373139 LIBS = ['valgrind' ])
31383140
3139- environment_list .append (nacl_env )
3141+ if nacltool : environment_list .append (nacl_env )
31403142
31413143if not nacl_env .Bit ('nacl_glibc' ):
31423144 # These are all specific to nacl-newlib so we do not include them
@@ -3390,11 +3392,11 @@ nacl_irt_env.ClearBits('bitcode')
33903392# used to build user/test code. nacl-clang is used everywhere for the IRT.
33913393nacl_irt_env .SetBits ('nacl_clang' )
33923394
3393- nacl_irt_env .Tool ('naclsdk' )
3395+ if nacltool : nacl_irt_env .Tool ('naclsdk' )
33943396# These are unfortunately clobbered by running Tool, which
33953397# we needed to do to get the destination directory reset.
33963398# We want all the same values from nacl_env.
3397- nacl_irt_env .Replace (EXTRA_CFLAGS = nacl_env ['EXTRA_CFLAGS' ],
3399+ if nacltool : nacl_irt_env .Replace (EXTRA_CFLAGS = nacl_env ['EXTRA_CFLAGS' ],
33983400 EXTRA_CXXFLAGS = nacl_env ['EXTRA_CXXFLAGS' ],
33993401 CCFLAGS = nacl_env ['CCFLAGS' ],
34003402 CFLAGS = nacl_env ['CFLAGS' ],
@@ -3415,7 +3417,7 @@ if nacl_irt_env.Bit('build_x86_32'):
34153417# The IRT is C only, don't link with the C++ linker so that it doesn't
34163418# start depending on the C++ standard library and (in the case of
34173419# libc++) pthread.
3418- nacl_irt_env .Replace (LINK = (nacl_irt_env ['LINK' ].
3420+ if nacltool : nacl_irt_env .Replace (LINK = (nacl_irt_env ['LINK' ].
34193421 replace ('nacl-clang++' , 'nacl-clang' )))
34203422
34213423# TODO(mcgrathr): Clean up uses of these methods.
@@ -3531,8 +3533,8 @@ def AddImplicitLibs(env):
35313533 # The -B<dir>/ flag is necessary to tell gcc to look for crt[1in].o there.
35323534 env .Prepend (LINKFLAGS = ['-B${LIB_DIR}/' ])
35333535
3534- AddImplicitLibs (nacl_env )
3535- AddImplicitLibs (nacl_irt_env )
3536+ if nacltool : AddImplicitLibs (nacl_env )
3537+ if nacltool : AddImplicitLibs (nacl_irt_env )
35363538
35373539nacl_irt_env .Append (
35383540 BUILD_SCONSCRIPTS = [
@@ -3547,7 +3549,7 @@ nacl_irt_env.Append(
35473549 ])
35483550nacl_irt_env .AddChromeFilesFromGroup ('untrusted_irt_scons_files' )
35493551
3550- environment_list .append (nacl_irt_env )
3552+ if nacltool : environment_list .append (nacl_irt_env )
35513553
35523554# Since browser_tests already use the IRT normally, those are fully covered
35533555# in nacl_env. But the non_browser_tests don't use the IRT in nacl_env.
@@ -3612,7 +3614,7 @@ def IrtTestAddNodeToTestSuite(env, node, suite_name, node_name=None,
36123614 is_broken , is_flaky )
36133615nacl_irt_test_env .AddMethod (IrtTestAddNodeToTestSuite , 'AddNodeToTestSuite' )
36143616
3615- environment_list .append (nacl_irt_test_env )
3617+ if nacltool : environment_list .append (nacl_irt_test_env )
36163618
36173619
36183620windows_coverage_env = windows_debug_env .Clone (
0 commit comments