Revert of Change some source_sets to static_library to shrink binary (patchset #1 id:1 of )

Reason for revert:
It looks like this fails when rolled into Chromium, with this error:

Undefined symbols for architecture x86_64:
  "_NaClSwitch", referenced from:
      _NaClSyscallSegRegsSaved in nacl_syscall_64.o
     (maybe you meant: _NaClSwitchAVX, _NaClSwitchSSE )
  "_nacl_current_thread_tls_offset", referenced from:
      _NaClSyscallSeg in nacl_syscall_64.o
      _NaClGetTlsFastPath1 in nacl_syscall_64.o
      _NaClGetTlsFastPath1End in nacl_syscall_64.o
ld: symbol(s) not found for architecture x86_64


with these gn settings:

goma_dir = "/b/c/cipd/goma"
is_component_build = true
is_debug = true
symbol_level = 1
use_goma = true

Original issue's description:
> Change some source_sets to static_library to shrink binary
> The gn generated binaries are bigger than the gyp generated binaries.
> One of the known differences was due to the nacl_global_rng and
> g_NaCl_log_gio global variables which are in gn's chrome.dll but not in
> gyp's. In some cases these global variables can serve as effective
> canaries - removing them can lead to much code going away as well.
> Changing from source_set to static_library means that the linker is not
> required to link in the associated .obj files, which can save time and
> space.
> In this case no code was removed so the space savings was small - just
> the 1.5 KB of space consumed by the globals.
> BUG=630755
> Committed:
# Skipping CQ checks because original CL landed less than 1 days ago.

2 files changed
tree: 84fb263f1f4a9a3bc0c8a96ea30d43674f00f2b5
  1. .gitignore
  2. .gn
  6. DEPS
  12. SConstruct
  13. build/
  14. buildbot/
  15. codereview.settings
  16. config.gni
  17. docs/
  18. documentation/
  19. infra/
  20. pnacl/
  21. pynacl/
  23. scons
  24. scons.bat
  26. site_scons/
  27. src/
  28. tests/
  29. toolchain_build/
  30. toolchain_revisions/
  31. tools/

Native Client

Welcome to Native Client. For the latest information about Native Client, see the Native Client project page.


Most of the Native Client project documentation is available online:

Directory structure

The following list describes major files and directories that you‘ll see in your working copy of the repository, including some directories that don’t exist until you've built Native Client. Paths are relative to the native_client directory.

  • COPYING NOTICE RELEASE_NOTES documentation/: Documentation, release, and license information.

  • SConstruct scons.bat scons scons-out/ site_scons/: Build-related files. The scons.bat and scons files, with data from SConstruct, let you build Native Client and its tests. The scons-out and site-scons directories don‘t exist in the git repository; they’re created when Native Client is built. The scons-out/*/staging directories contain files, such as the Native Client plug-in and compiled examples, that let you use and test Native Client.

  • src/: Core source code for Native Client.

  • src/include/: Header files that are missing from some platforms and are used by more than one major part of Native Client

  • src/shared/: Source code that's used by both trusted code (such as the service runtime) and untrusted code (such as Native Client modules)

  • src/third_party: Other people's source code

  • src/trusted/: Source code that's used only by trusted code

  • src/untrusted/: Source code that's used only by untrusted code

  • tests/common/: Source code for examples and tests.

  • ../third_party/: Third-party source code and binaries that aren't part of the service runtime. When built, the Native Client toolchain is in src/third_party/nacl_sdk/.

  • tools/: Utilities such as the plug-in installer.