Commit Graph

11 Commits

Author SHA1 Message Date
Rob Mohr
a0ba54f648 Roll GN to 239533d
This caused gn format to flag many things which were also fixed.

Change-Id: Ie1d9081a1b08047bec52c60f54d2a94366be1ba6
2020-02-28 01:33:18 +00:00
Wyatt Hepler
b9db09f7c2 Build with -g by default
Change-Id: I5331319164bb103bc226d4553d883e27411be5a9
2020-01-28 01:52:44 +00:00
Wyatt Hepler
818e3316a4 pw_polyfill: C++11 and C++14 unit tests
Change-Id: I1a1ced2ed59a3d7dcf46c4c6a0e2e04485502fba
2020-01-17 09:06:30 -08:00
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
Alexei Frolov
c15a98852f
Download external Go dependencies in build
This change updates the Go GN integration to download external
dependencies for Go packages before running "go build". These
dependencies are listed in the pw_go_package template using build
metadata and collected to a "go get" invocation.

To support this, the pw_exec template is expanded to allow setting
positional arguments from a file.

Change-Id: If4f6c71f037b35bb041984da9982a1629d1d36b0
2019-12-26 10:39:48 -08:00
Rob Mohr
49de49203a Fix how pw_build docs are used.
Change-Id: Ic6d357a116f0da8b167a1b9618ca84f6513c5ec5
2019-12-10 20:10:44 -08:00
Wyatt Hepler
1919c64b5c Move non-virtual-dtor warning to C++ only
Causes a warning when building C files.

Change-Id: Ib82134a0bb7a15c88a3edfbdb04d570fde643198
2019-12-06 16:24:11 -08:00
Rob Mohr
e6cbdf8a9b Add -Wnon-virtual-dtor.
This has come up a couple times already, and when I import this
internally I get errors.

https://pigweed-review.git.corp.google.com/c/pigweed/pigweed/+/1900
https://pigweed-review.git.corp.google.com/c/pigweed/pigweed/+/2000

Change-Id: I96444edba75b7bbefdeb9d3718117a6dafa77bfb
2019-11-18 14:37:48 -08:00
Wyatt Hepler
979890d732 Compiler option updates
- Add -fdiagnostics-color so that compiler warnings are colorized. The
  way Ninja invokes GCC disables colors by default.
- Move -Wno-psabi up to the arm_gcc_toolchain template so that it
  doesn't have to be specified for each arm_gcc_toolchain instance.
- Add -Werror to the strict_warnings config to prevent warnings from
  slipping through. Exempt a few warnings that should actually be
  warnings.

Change-Id: I8656d6690b488f7b004f15abd7100b62e1945cfd
2019-11-07 10:51:32 -08:00
Keir Mierle
243e32a85f pw_unit_test: Make simple runner look like GTest
This makes these changes to the unit test framework:

(1) Makes the simple test runner output match GTest
(2) Adds a new RunAllTestsStart() and RunAllTestsEnd() event
(3) Adds an intentionally-failing expectation to the sample test

Example output:

[==========] Running all tests.
[ RUN      ] PigweedTest.ExpectBool
[       OK ] PigweedTest.ExpectBool
[ RUN      ] PigweedTest.ExpectBasicComparisons
[       OK ] PigweedTest.ExpectBasicComparisons
[ RUN      ] PigweedTest.ExpectStringEquality
[       OK ] PigweedTest.ExpectStringEquality
[ RUN      ] PigweedTest.NonCopyableType
[       OK ] PigweedTest.NonCopyableType
[ RUN      ] PigweedTest.MacroArgumentsOnlyAreEvaluatedOnce
[       OK ] PigweedTest.MacroArgumentsOnlyAreEvaluatedOnce
[ RUN      ] FixtureTest.CustomFixture
[       OK ] FixtureTest.CustomFixture
[ RUN      ] PigweedTestFixture.TheNumberIs35
[       OK ] PigweedTestFixture.TheNumberIs35
[ RUN      ] PigweedTestFixture.YupTheNumberIs35
[       OK ] PigweedTestFixture.YupTheNumberIs35
[ RUN      ] PigweedTestFixture.MissingExpectations
../pw_unit_test/framework_test.cc:156: Failure
      Expected: missed_expectations == 200
[  FAILED  ] PigweedTestFixture.MissingExpectations
[==========] Done running all tests.
[  PASSED  ] 8 test(s).
[  FAILED  ] 1 test(s).

Change-Id: I813096a9d62423e256993ae03724337d52702297
2019-11-05 14:48:19 -08:00
Alexei Frolov
1a82c146ff
Initial Pigweed modules
This change adds Pigweed's first few (incomplete) modules: pw_build,
pw_status, and pw_toolchain. The main scaffolding for Pigweed's GN-based
build system is also included, with a root BUILDCONFIG and BUILD.gn file
defining a top-level modules build target.

Change-Id: I09599443d50696343d6c5b85853cb5cee3ce0026
2019-10-31 17:43:53 -07:00