Commit Graph

12 Commits

Author SHA1 Message Date
Alexei Frolov
b499d3f28c pw_protobuf_compiler: Remove pw_protobuf_GENERATORS build arg
This updates pw_protobuf_compiler to always create a target for each
supported protobuf generator, instead of having a build arg to select
which ones to use, simplifying the use of pw_proto_library.

Change-Id: I2699c9c5045e8671a061f8c8bc11a94244d008f1
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/22721
Reviewed-by: Armando Montanez <amontanez@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Alexei Frolov <frolv@google.com>
2020-10-29 01:08:02 +00:00
Ewout van Bekkum
fa1fc6683c targets: use pw_build:extra_strict_warnings upstream
Updates all Pigweed targets, except for arduino, to use the
extra_strict_warnings where relevant.

Also fixes up several places which wouldn't compile with "-Wshadow"
enabled.

Change-Id: Ieb2c7f4870e4609181825e2c894ccbac56135cad
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/21688
Reviewed-by: Armando Montanez <amontanez@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Ewout van Bekkum <ewout@google.com>
2020-10-19 19:25:19 +00:00
Wyatt Hepler
d49f8fe3f3 BUILD.gn files: Improve import formatting
The "# gn-format disable" comments are no longer necessary. Delete these
comments and reformat with a Vim macro and gn format.

Change-Id: Ia62c40ad73eef91187d0d443d6e3b0fa723e5aa9
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/21380
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
2020-10-15 18:12:55 +00:00
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