Commit Graph

7 Commits

Author SHA1 Message Date
Wyatt Hepler
2119240da1 GN build: Override built-in targets
- Override built-in targets, which gives more flexibility than
  set_defaults.
- Provide the default C++ in the toolchain, which can be overridden by
  explicitly specifying a config on a target.
- Remove the C++17 default flags from public configs, since it is no
  longer needed.

Change-Id: If211bada971c46cef83909bf15811a4f2c1eb7fd
2020-01-16 11:41:15 -08:00
Wyatt Hepler
9bc159fa59 pw_toolchain: Define stamp command for Windows
- Provide a touch-like stamp command for Windows.
- Update host_gcc.gni with string_join to match host_clang.gni.

Change-Id: I56a216db4928e1ec402c4d9e4843e6dad60e0c05
2020-01-15 08:06:23 -08:00
Wyatt Hepler
c3a2d475ce Build tweaks for C files
- Use the full file name for object files in the GN build, e.g.
  file.cc.o instead of file.o. This allows having .cc and .c files with
  the same name.
- Have the pw_auto_add_simple_module CMake function build .c and .cc
  test files together.

Change-Id: I3086a96bcc55b013db4f2c278418c17ce1b9fd82
2020-01-09 22:18:49 +00:00
Alexei Frolov
77af7193e0 Fix MacOS xcode sysroot command
The way in which the exec script receives arguments was recently
modified but the MacOS clang toolchain that calls it was not updated.
This change fixes that.

Fixes: 11
Change-Id: Ie41a1c62c9c9aa3b7e7d54d16b1f8096b9dbb559
2019-12-20 20:10:18 +00:00
Rob Mohr
4b501c6f84
Use --sysroot on Mac.
Fix: 11
Change-Id: Iff15f485294f503f00d3a3f7b9fe8d3bd2eb3544
2019-12-19 11:33:12 -08:00
Wyatt Hepler
cca0daf7b1 Clang toolchain Linux support
- Update host_clang to work on Linux: switch to -Map and --gc-sections
  options
- Make pw_target_toolchain a build arg for Linux and macOS targets.
  Default to gcc on Linux, clang on macOS.
- Rename x86_linux_gcc to host_gcc.

Change-Id: I72eef9ba9398a331f6567b68ad404092186eb15b
2019-11-14 12:34:15 -08:00
Keir Mierle
586719197a pw_toolchain: Start host_clang toolchain
This adds a generic host_clang toolchain, targeting hosts running Mac and
Linux to start, and likely Windows later.

For now, on Mac the default toolchain is set to host_clang_og

Change-Id: Iea457c61586930d509439c6616574c9a74919433
2019-11-14 18:26:54 +00:00