Commit Graph

9 Commits

Author SHA1 Message Date
Michael Spang
6a8459589c pw_toolchain: Allow iOS to use the right -map flag
In general toolchains should set values for the builtin arguments
current_cpu and current_os; this configures both the toolchain itself
and everything it builds. Make it so in Pigweed.

If there's a toolchain with current_os = "ios", use the arguments for
Apple's linker.

Bug: 241
Change-Id: I2ce8c46eb48cbc70c5d14086934bdf59c2fc3f36
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/16006
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Michael Spang <spang@google.com>
2020-08-14 19:29:22 +00:00
Alexei Frolov
dd6fa5c7bd third_party: Add nanopb BUILD.gn file
This change creates a Pigweed third_party directory and defines a GN
build file for nanopb which exposes a pw_source_set for the nanopb
library from a build arg pointing to a local nanopb installation.

Change-Id: I6779203626abce7821dc3fcef6dcbc11c319b43c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/15763
Reviewed-by: Keir Mierle <keir@google.com>
2020-08-14 16:58:59 +00:00
Robert Oliver
6d05de13e7 pw_trace: tokenizer basic example
Run the trace sample app and dump all trace data to a file.
- Use std::chrono::system_clock as the time source for host builds.
- Add trace_to_file.h which registers callbacks and saves all trace data
to a provided binary file.

Change-Id: I57fac75ed91fc98646e7aae920897687a39549ab
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/13802
Commit-Queue: Rob Oliver <rgoliver@google.com>
Reviewed-by: (☞゚∀゚)☞ Tennessee Carmel-Veilleux  <tennessee@google.com>
2020-07-31 20:57:23 +00:00
Robert Oliver
21dcf27113 pw_trace: Initial tokenized trace backend
Tokenized trace, implements trace events by tokenizing all compile time
information of the event into a 32bit number (using tokenizer module).

This CL just adds the encoding of trace events and callback hooks,
buffering which usies the callback will be added in a future CL.

Test: passes included test
Change-Id: Ibfcc34211c09965af8da030e28dba5e8f7c6ccdb
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/11428
Commit-Queue: Rob Oliver <rgoliver@google.com>
Reviewed-by: (☞゚∀゚)☞ Tennessee Carmel-Veilleux  <tennessee@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2020-07-31 12:44:51 +00:00
Armando Montanez
86003203b7 pw_toolchain: Update toolchain options
Updates pigweed to depend directly on is_host_toolchain provided by the
toolchain. Also adds a toolchain option that controls the extension of
final linked binaries.

Change-Id: Ia9499fe5974997a5bbc0bb9cfb89b5569b987189
2020-06-16 18:00:06 -07:00
Alexei Frolov
48d58a095f host: Don't add nanopb generator if it exists
This checks if the project has already set the nanopb protobuf generator
before adding it as part of the host target.

Change-Id: I1336d73bdcbcb786bf783909b32230bebf10bdba
2020-06-16 10:00:17 -07:00
Armando Montanez
ccc3ee14b9 Update Pigweed presubmit
Updates the upstream presubmit to play nicely with The Great GN
Refactor.

Change-Id: I2296db592b4c8e3c2d5592410b9846e7435ac1fc
2020-06-16 10:00:17 -07:00
Armando Montanez
d9a8a346bc Clean up host toolchains
Update the host toolchains to be prefixed with their target name and use
a slightly more compact style to define the toolchain scopes.

Change-Id: Ib0dae237299e74c6c48cd4c35869fd215563a7bf
2020-06-16 09:50:59 -07:00
Armando Montanez
164624f0b0 Set up all host toolchains
Sets up clang and gcc based toolchains for all host target builds.
Defaults to using Clang for linux/mac and GCC for windows.

Change-Id: I1a15d98581cbf886fbb86321f2d7dabb0dd43cf1
2020-06-16 09:50:59 -07:00