Commit graph

1640 commits

Author SHA1 Message Date
Colin Cross
22c3dc826b Fix race condition writing soong.config am: d8f2014d3b
am: a0411a2cf6

Change-Id: Ic477b3640d32d3706e0adee785164be6d3c545d0
2016-11-03 19:30:37 +00:00
Colin Cross
a0411a2cf6 Fix race condition writing soong.config
am: d8f2014d3b

Change-Id: I5624e6749aa57beb6fc0eefb3058ac2b019ef75d
2016-11-03 19:27:37 +00:00
Colin Cross
d8f2014d3b Fix race condition writing soong.config
soong_build is run twice simultaneously now, once for manifest
generation and once for docs generation.  If one starts writing the
default soong.config file, and the other starts reading it, the reader
can see an empty file and fail.  Write the soong.config file to a
temporary file and the atomically rename it into place.

Bug: 32628314
Test: rm out/soong/soong.config && m -j blah && cat out/soong/soong.config
Change-Id: I8119b11d45093284b24cbc926d81eb9ea4bf2e27
2016-11-03 16:48:37 +00:00
Dan Willemsen
0c73b74eb1 Merge changes from topic 'genpath_yacc' am: 5a054df23c
am: f1bc35a478

Change-Id: Ic436d349d04a7f8c9a16edf6379579f3c876a796
2016-11-03 07:22:08 +00:00
Dan Willemsen
e092b92b63 Add yacc generated headers to the include path am: e1a3ce3609
am: 967f8d4750

Change-Id: I4de18228ee24306a4cd6ed90dbeeb3dcf66c636d
2016-11-03 07:22:06 +00:00
Dan Willemsen
d1408ab977 Add subdir to GenPath am: 21ec49068f
am: 37e1142b77

Change-Id: I55aaf7a72e89daa4d42b7f8119d12f6f6080063d
2016-11-03 07:22:04 +00:00
Colin Cross
0b796789c2 Merge "Support sanitizing a single device arch" am: 42e04de8a7
am: e41ddecd1f

Change-Id: I2702bee8368af00a9b8be00e761e3d357677ee47
2016-11-03 07:21:29 +00:00
Dan Willemsen
f1bc35a478 Merge changes from topic 'genpath_yacc'
am: 5a054df23c

Change-Id: Ib0ca3236c028b181c5adc4870d44e7c5f0b753ae
2016-11-03 07:19:08 +00:00
Dan Willemsen
967f8d4750 Add yacc generated headers to the include path
am: e1a3ce3609

Change-Id: I403fa749b607f860298e12454c3774c97e597791
2016-11-03 07:19:07 +00:00
Dan Willemsen
37e1142b77 Add subdir to GenPath
am: 21ec49068f

Change-Id: Iea27631a3214f515aec100381806d7ea1abbf482
2016-11-03 07:19:06 +00:00
Colin Cross
e41ddecd1f Merge "Support sanitizing a single device arch"
am: 42e04de8a7

Change-Id: I8fe2556a325e31c32144309c9570087dc3acdadf
2016-11-03 07:18:29 +00:00
Dan Willemsen
5a054df23c Merge changes from topic 'genpath_yacc'
* changes:
  Add yacc generated headers to the include path
  Add subdir to GenPath
2016-11-03 07:13:32 +00:00
Treehugger Robot
42e04de8a7 Merge "Support sanitizing a single device arch" 2016-11-03 07:12:54 +00:00
Dan Willemsen
e1a3ce3609 Add yacc generated headers to the include path
Test: mmma -j system/tools/aidl
Change-Id: I444c7f2b004877e027f67e36e016b528511e1a32
2016-11-02 21:19:18 -07:00
Dan Willemsen
21ec49068f Add subdir to GenPath
We were emulating this for proto files, standardize it and make the
other generators use it as well.

Test: Compare out/soong/build.ninja before/after change
Test: mmma -j system/tools/hidl
Change-Id: I1888c7b981749060a398387bbb9b481270bf6d75
2016-11-02 21:19:11 -07:00
Dan Willemsen
fd3c803ab7 Merge "Update build.ninja.in for blueprint upgrade" am: eb716e2559
am: 79cfc83f6e

Change-Id: Id7e026680c92086eedc841cee98d33835d2c0bd3
2016-11-03 02:48:16 +00:00
Dan Willemsen
79cfc83f6e Merge "Update build.ninja.in for blueprint upgrade"
am: eb716e2559

Change-Id: Icb0a3136dda5c41db7772a6e9f553203493fea4a
2016-11-03 02:45:16 +00:00
Dan Willemsen
eb716e2559 Merge "Update build.ninja.in for blueprint upgrade" 2016-11-03 02:39:18 +00:00
Dan Willemsen
e249494552 Allow overriding tidy configs using environment variables am: 318af8be27
am: 568be82106

Change-Id: Ifadfeef602bc0e480373276ae70e0c91363fa4c2
2016-11-03 00:47:00 +00:00
Dan Willemsen
568be82106 Allow overriding tidy configs using environment variables
am: 318af8be27

Change-Id: Id73b8894bc6b33943ac131fe48a2620edee622f4
2016-11-03 00:44:00 +00:00
Dan Willemsen
627803256f Update build.ninja.in for blueprint upgrade
Bug: 32574042
Test: m -j
Change-Id: I34a3180a34b156955baf49c87fa985583083687e
2016-11-02 16:21:56 -07:00
Dan Willemsen
318af8be27 Allow overriding tidy configs using environment variables
This matches what Make did.

Bug: 32244182
Test: WITH_TIDY=1 m -j
Test: WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=* m -j
Test: WITH_TIDY=1 DEFAULT_EXTERNAL_VENDOR_TIDY_CHECKS=* m -j
Change-Id: I12ee413829d35e20f21f8ca49bb315ea831a6506
2016-11-02 15:47:20 -07:00
Colin Cross
23ae82a2b2 Support sanitizing a single device arch
Allow specifying one or more architectures to sanitize for.  Defaults to
sanitizing all architectures.  Allows reducing the cost of sanitization
by only sanitizing half of the platform.

Bug: 29498013
Test: No change to build.ninja files with m -j SANITIZE_TARGET=address
Test: m -j SANITIZE_TARGET=address SANITIZE_TARGET_ARCH=arm
Test: nm -D $OUT/system/bin/app_process64 | grep asan, no asan symbols found
Change-Id: I972cccc2f19443895d47b44bd8104105f93ffb7d
2016-11-02 15:18:19 -07:00
Dan Willemsen
379bd1416e Merge changes from topic 'soong-clang-tidy' am: 9194d8076c
am: f763a52f3e

Change-Id: I0d753706eae9d8837fca59a3212008cc0ef26b27
2016-11-01 01:25:30 +00:00
Dan Willemsen
3b00f2a1bf Add clang-tidy support am: a03cf6d322
am: b274202d2a

Change-Id: I9cdfb2c78cf67d51a4e28985039a51e176c35a16
2016-11-01 01:24:55 +00:00
Dan Willemsen
7087976bf3 Start using "struct Objects" to store object Paths am: 5cb580f407
am: 40d479babe

Change-Id: Ie55ed98e4a17eb8e2b0724e74f256d4c588dd44b
2016-11-01 01:24:54 +00:00
Dan Willemsen
f763a52f3e Merge changes from topic 'soong-clang-tidy'
am: 9194d8076c

Change-Id: Idbe3f27c087f50b8719e60d519f93e80af757a9d
2016-11-01 01:23:06 +00:00
Dan Willemsen
b274202d2a Add clang-tidy support
am: a03cf6d322

Change-Id: Idd480832fa400f6f7f401fce619426f61bb69525
2016-11-01 01:22:24 +00:00
Dan Willemsen
40d479babe Start using "struct Objects" to store object Paths
am: 5cb580f407

Change-Id: I40aa1ef054eab887c56d55ce56f179ea9ae58d48
2016-11-01 01:22:23 +00:00
Treehugger Robot
9194d8076c Merge changes from topic 'soong-clang-tidy'
* changes:
  Add clang-tidy support
  Start using "struct Objects" to store object Paths
2016-11-01 01:19:00 +00:00
Evgenii Stepanov
9a518cef45 [soong] Enable LOCAL_SANITIZE:=cfi and add LOCAL_SANITIZE_DIAG. am: 1e405e160a
am: 45d131b88d

Change-Id: I21e8966e4564aaf2c2579d07588a7369324a086e
2016-11-01 01:03:19 +00:00
Evgenii Stepanov
45d131b88d [soong] Enable LOCAL_SANITIZE:=cfi and add LOCAL_SANITIZE_DIAG.
am: 1e405e160a

Change-Id: I43ed2fdc9a4b32d22d229eca9f48cb4f9c4672de
2016-11-01 01:00:49 +00:00
Dan Willemsen
a03cf6d322 Add clang-tidy support
For every file which we can run clang-tidy (C/C++ clang-built), we add a
new build node that depends on the object file (since clang-tidy does
not export a depfile), and is depended on by the link step. This is
better than how we're doing it in make, since calling tidy can be turned
on or off without needing to rebuild the object files.

This does not attempt to port WITH_TIDY_ONLY from Make, since the way
that it works is broken (due to the lack of a depfile).

Bug: 32244182
Test: WITH_TIDY=true mmma -j bionic/libc
Test: ./soong (Setting ClangTidy: true)
Change-Id: I40bbb5bb00d292d72bf1c293b93080b5f9f6d8ea
2016-10-31 16:21:01 -07:00
Dan Willemsen
5cb580f407 Start using "struct Objects" to store object Paths
So that we can represent other files that get generated along with the
objects, like the gcno coverage information, and per-file clang-tidy
runs.

Test: Soong's build.ninja identical before/after
Change-Id: I5c553a153c436d5403549f62c73fe79c5f101779
2016-10-31 16:18:49 -07:00
Evgenii Stepanov
1e405e160a [soong] Enable LOCAL_SANITIZE:=cfi and add LOCAL_SANITIZE_DIAG.
LOCAL_SANITIZE_DIAG works for ubsan, too.

Bug: 22033465
Test: build a test target with cfi and diag { cfi } properties.

Change-Id: I9cd8e8df9b330430b321709d7f05b4da0294e771
2016-10-31 15:29:08 -07:00
Dan Willemsen
67c12a6bfe Merge "Remove support for building with OSX 10.8/9 SDKs" am: 5d5db02bf6
am: 82c9ed6100

Change-Id: I3a6daaa354e85e6d3fb0d9b65ec14fdc5268012f
2016-10-28 23:05:15 +00:00
Dan Willemsen
82c9ed6100 Merge "Remove support for building with OSX 10.8/9 SDKs"
am: 5d5db02bf6

Change-Id: I7741e225ff063368d83ff74ba7c2b2f4556ad6cd
2016-10-28 22:59:43 +00:00
Treehugger Robot
5d5db02bf6 Merge "Remove support for building with OSX 10.8/9 SDKs" 2016-10-28 22:50:20 +00:00
Dan Willemsen
85e3d0110f Remove support for building with OSX 10.8/9 SDKs
Our minimum build version listed on source.android.com is 10.10. Change
the minimum used SDK to 10.10, but keep the deployed version at 10.8 so
that our distributed tools still work on older versions.

CoreBluetooth/CoreBluetooth.h isn't available directly in older SDKs,
but we need to include it in the 10.12 SDK.

Test: `m -j` with 10.11, 10.12 SDKs.
Test: Verified the builders all have at least 10.10 sdk available.
Change-Id: I82321875b8b3a4099ea829ce2d75e1af29cb38c6
2016-10-28 13:57:34 -07:00
Colin Cross
8f03b043de Merge changes from topic 'proto' am: d41935f34d
am: e9c465d644

Change-Id: I84d0bc803831fad0123890ad81b6a5ab4c9fcd82
2016-10-28 20:21:18 +00:00
Colin Cross
e9c465d644 Merge changes from topic 'proto'
am: d41935f34d

Change-Id: Iebcf780af405dc7182937a59cbcb42ee24aba210
2016-10-28 20:21:00 +00:00
Colin Cross
0cb3a73c53 Add support for .proto files am: 0c461f1f6e
am: 6fded76595

Change-Id: Ie8a28d25986d7129b29842b8a2aa5255c1799d65
2016-10-28 20:15:11 +00:00
Colin Cross
311afec662 Add Path.Base helper am: 4f6fc9c1d8
am: 656028558b

Change-Id: I8df966e7dfb3bf12c6aff14eff9cefc63d0431c2
2016-10-28 20:15:10 +00:00
Colin Cross
55ab14d5af Simplify compileObjs am: 2f33635542
am: dc90f3bd71

Change-Id: I696a2fa186a93bc74828c0a16a505a4ce73265c7
2016-10-28 20:15:08 +00:00
Colin Cross
6fded76595 Add support for .proto files
am: 0c461f1f6e

Change-Id: I1f96fc0bf85cc9afec18b1323922a319db6dbf64
2016-10-28 20:10:12 +00:00
Colin Cross
656028558b Add Path.Base helper
am: 4f6fc9c1d8

Change-Id: I2e671b0916588d960d5ed5e496a5522564d4dee2
2016-10-28 20:10:10 +00:00
Colin Cross
dc90f3bd71 Simplify compileObjs
am: 2f33635542

Change-Id: I5766b8964fc1da175d74408c2ffe089f989305c7
2016-10-28 20:10:09 +00:00
Treehugger Robot
d41935f34d Merge changes from topic 'proto'
* changes:
  Add support for .proto files
  Add Path.Base helper
  Simplify compileObjs
2016-10-28 20:04:51 +00:00
Colin Cross
0c461f1f6e Add support for .proto files
.proto files are translated to .pb.cc and .pb.h files, which are then
compiled normally.

Bug: 32286026
Test: mmma -j system/extras/perfprofd
Change-Id: I538071424d667aacf35b4b8bfebe217f5f092726
2016-10-27 15:28:09 -07:00
Colin Cross
4f6fc9c1d8 Add Path.Base helper
Add Path.Base to return the basename of a Path object.

Test: builds
Change-Id: I2bf1519dc5039bedb1586e7ec18297a293e32e11
2016-10-27 15:18:17 -07:00