Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / native_client / src / untrusted / irt / nacl.scons
index df60f36..40fa6a5 100644 (file)
@@ -69,14 +69,6 @@ irt_support_objs += [
         '${MAIN_DIR}/src/untrusted/valgrind/dynamic_annotations.c'),
     ]
 
-if env.Bit('target_arm'):
-  read_tp_obj = blob_env.ComponentObject('aeabi_read_tp.o', 'aeabi_read_tp.S')
-  irt_support_objs.append(read_tp_obj)
-  # Publish the object file for tests/irt_private_pthread to use.
-  # Putting aeabi_read_tp.o into libirt_support_private is not
-  # sufficient because of link ordering issues.
-  env.Replicate('${STAGING_DIR}', read_tp_obj)
-
 # Build a library so that irt_support_objs can be used in tests that
 # cover IRT-internal code.
 env.ComponentLibrary('libirt_support_private', irt_support_objs)
@@ -92,31 +84,18 @@ irt_libs = ['srpc',
             'm',
             ]
 
-irt_core_library = blob_env.ComponentProgram(
-    'irt_core', irt_support_objs + irt_nonbrowser, EXTRA_LIBS=irt_libs)
+irt_core_raw = blob_env.ComponentProgram(
+    'irt_core_raw', irt_support_objs + irt_nonbrowser, EXTRA_LIBS=irt_libs)
+
+irt_core_nexe = blob_env.ApplyTLSEdit(
+    'irt_core.nexe',
+    irt_core_raw)
+
+irt_core_library = blob_env.Install('${STAGING_DIR}', irt_core_nexe)
+blob_env.Alias('irt_core', irt_core_library)
+blob_env.ComponentProgramAlias(irt_core_library)
+
 env.SDKInstallBin('irt_core.nexe', irt_core_library)
 
-# TODO(mcgrathr): these should be installed, but scons is a mystery
+# TODO(mcgrathr): this should be installed, but scons is a mystery
 #env.AddHeaderToSdk(['irt.h'])
-#env.AddHeaderToSdk(['irt_ppapi.h'])
-
-# Make sure that the linked IRT nexe never uses TLS via the TLS ABI
-# register (e.g., %gs on x86-32).  All IRT code must avoid direct use
-# of the TLS ABI register, which is reserved for user TLS.  Instead,
-# ensure all TLS accesses use a call to __nacl_read_tp (or __aeabi_read_tp
-# for ARM), which the IRT code overrides to segregate IRT-private TLS
-# from user TLS.
-if ((env.Bit('build_arm') or env.Bit('build_x86_32'))
-    # Do not try to run OBJDUMP if 'built_elsewhere', since that *might*
-    # mean that a toolchain is not even present. E.g., the arm buildbots
-    # do not have the pnacl toolchain, since that is built for x86 hosts.
-    and not env.Bit('built_elsewhere')):
-  check_tls_arch = '${TARGET_FULLARCH}'
-  if env.Bit('build_arm'):
-    check_tls_arch = 'arm'
-  node = env.CommandTest('irt_core_tls_test.out',
-                         ['${PYTHON}', env.File('check_tls.py'),
-                          check_tls_arch, '${OBJDUMP}', irt_core_library],
-                         # don't run ${PYTHON} under the emulator.
-                         direct_emulation=False)
-  env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_core_tls_test')