Commit graph

437 commits

Author SHA1 Message Date
Colin Cross
f2da657628 Merge "Revert "Use java prebuilts"" am: 4d69df5191 am: f4e78ccf25
am: 96018b3d10

Change-Id: Ib54b8c0fbb95179bff97abe028d133da3528380f
2017-07-19 22:58:23 +00:00
Colin Cross
f4e78ccf25 Merge "Revert "Use java prebuilts""
am: 4d69df5191

Change-Id: I978bf3d25e0be2a2a6b40c5b396821cc2a8d9365
2017-07-19 22:52:21 +00:00
Colin Cross
02112900cc Revert "Use java prebuilts"
This reverts commit 1931750940.

Change-Id: I7a99fd6c53d35a2a674f2d60b113a727f3c453ce
2017-07-19 22:42:46 +00:00
Colin Cross
1a05e52e6d Merge "Merge "Use java prebuilts" am: 26e1b6d6c2 am: fcbaa25380" into oc-dev-plus-aosp
am: 7b38914e4e

Change-Id: I61313e8009c964868cf4984a7f86811748e98819
2017-07-19 22:19:03 +00:00
Colin Cross
fcbaa25380 Merge "Use java prebuilts"
am: 26e1b6d6c2

Change-Id: If761856f9fd509d2c5694844b6bb10966717e0b1
2017-07-19 22:13:09 +00:00
Colin Cross
1931750940 Use java prebuilts
Point the make java variables at JDK prebuilts in
prebuilts/jdk/jdk8, add them to the path, and clean up
some old overrides.

Bug: 62956999
Test: m -j checkbuild
Change-Id: Ibbeb30fab96e45aedd5bb6d710d1170f85789982
2017-07-14 14:18:53 -07:00
Dan Willemsen
4d62a6bfde Merge "Stop using make wrapper around soong_ui" am: 80c05c518b am: 757926d509
am: f734d09753

Change-Id: I1ab7eba7edab3f19af08fc4ed4ec7887347c3c9e
2017-07-13 21:49:25 +00:00
Dan Willemsen
757926d509 Merge "Stop using make wrapper around soong_ui"
am: 80c05c518b

Change-Id: I74b69fd1c6f6fd2a9feb9807770577b523656fb8
2017-07-13 21:41:26 +00:00
Dan Willemsen
d41ec5a3bc Stop using make wrapper around soong_ui
Instead of running make -> makeparallel -> soong_ui, just run soong_ui.
Soong_ui now handles user-facing argument parsing.

The user visible changes should only be:
* Most `make` command line options are no longer supported. Many didn't
do anything useful before this change either.
* `-j` is now implied, so not specifying it will default to full
parallelism instead of a single-threaded build.
* `make` debug messages are removed:
  make: Entering directory ...
  make: Leaving directory ...
  make: *** [run_soong_ui] Error 1

We still support the make workflow for users that don't use envsetup.sh
-- the build servers primarily, but also various helper scripts. These
will be converted later.

Test: in $TOP; make nothing
Test: in $TOP/bionic; make (runs real make, fails w/no makefile)
Test: in $TOP; m nothing
Test: in $TOP; mm nothing
Test: in $TOP; mma nothing
Test: in bionic/libc; m nothing
Test: in bionic/libc; mm
Test: in bionic/libc; mma
Test: in $TOP; mmm bionic/libc
Test: in $TOP; mmma bionic/libc
Test: in bionic; mmm libc
Test: in bionic; mmma libc
Test: set WITH_STATIC_ANALYZER=1, repeat above
Change-Id: Ic00190ac65a6aa924dad35d3d540c11d653b9c53
2017-07-12 17:16:49 -07:00
David Gross
832b31512b Merge "Teach mgrep to find soong/*.go files." am: 46d9bf8f9a am: bb67e3ae54 am: f515b91b3f
am: d5b0f9abe6

Change-Id: I1ea056d5997e31791153aafd149412a5e75953ce
2017-05-18 18:29:40 +00:00
David Gross
d5b0f9abe6 Merge "Teach mgrep to find soong/*.go files." am: 46d9bf8f9a am: bb67e3ae54
am: f515b91b3f

Change-Id: Idfa23df410e92a6afa7953cceb2286b3b994bbee
2017-05-18 18:25:39 +00:00
David Gross
d1d6fc5cff Teach mgrep to find soong/*.go files.
Test: $ cd $ANDROID_BUILD_TOP
      $ mgrep FORCE_BUILD_LLVM_DEBUG
      ./external/llvm/llvm-host-build.mk:24:ifeq ($(FORCE_BUILD_LLVM_DEBUG),true)
      ./external/llvm/soong/llvm.go:44:       if ctx.AConfig().IsEnvTrue("FORCE_BUILD_LLVM_DEBUG") {
      $ cd external/llvm
      $ mgrep FORCE_BUILD_LLVM_DEBUG
      ./llvm-host-build.mk:24:ifeq ($(FORCE_BUILD_LLVM_DEBUG),true)
      ./soong/llvm.go:44:     if ctx.AConfig().IsEnvTrue("FORCE_BUILD_LLVM_DEBUG") {

Change-Id: Ibe114550a8022d792a0c10c766c964a67721a6ba
2017-05-10 10:49:44 -07:00
Colin Cross
49718f9b85 Merge "Only set TARGET_PLATFORM version in lunch when explicitly requested" am: 4a3dc1458f am: 624932e360
am: 6969203720

Change-Id: I84652622424ec1abe317b847d5fe00962aeb5853
2017-05-03 04:49:16 +00:00
Colin Cross
1c1e142199 Only set TARGET_PLATFORM version in lunch when explicitly requested
Setting TARGET_PLATFORM_VERSION to DEFAULT_PLATFORM_VERSION during
"lunch sailfish-userdebug" causes unnecessary pain when
DEFAULT_PLATFORM_VERSION becomes invalid after branching.  Only
set TARGET_PLATFORM_VERSION if it was explicitly requested with
lunch sailfish-userdebug-OPR1.

Test: build/make/tests/envsetup_tests.sh
Bug: 34972208
Bug: 37208937
Change-Id: I40ba4617e73803c5bec1a8d317382f70fb3ec3a2
Merged-In: I40ba4617e73803c5bec1a8d317382f70fb3ec3a2
2017-05-03 02:47:59 +00:00
Colin Cross
b105e365c7 Only set TARGET_PLATFORM version in lunch when explicitly requested
Setting TARGET_PLATFORM_VERSION to DEFAULT_PLATFORM_VERSION during
"lunch sailfish-userdebug" causes unnecessary pain when
DEFAULT_PLATFORM_VERSION becomes invalid after branching.  Only
set TARGET_PLATFORM_VERSION if it was explicitly requested with
lunch sailfish-userdebug-OPR1.

Test: build/make/tests/envsetup_tests.sh
Bug: 34972208
Bug: 37208937
Change-Id: I40ba4617e73803c5bec1a8d317382f70fb3ec3a2
2017-05-01 14:26:40 -07:00
Yueyao Zhu
efc786a82b Add dtc and libufdt prebuilts to dev path
Test: . build/envsetup.sh and lunch
Bug: 37099957
Change-Id: I26e0b78a18ea4b3acdfb4cc64309ace327d29933
2017-04-07 14:18:07 -07:00
Christopher Ferris
36a570f7e0 Merge "Small fixes for environment variables." am: fd0cb496b1 am: 37f3a728a0
am: 7eb7796868

Change-Id: Iafed66e19bc114552b0261dd299379dbb37873c6
2017-03-24 16:23:45 +00:00
Christopher Ferris
fd0cb496b1 Merge "Small fixes for environment variables." 2017-03-24 16:15:07 +00:00
Colin Cross
1b81278572 Merge "Add TARGET_PLATFORM_VERSION to lunch" am: a007142381 am: 7b5dc8ad3e
am: 086d109f35

Change-Id: If005f3917b1f1664b111ce7d070590a47a259ce5
2017-03-24 00:27:16 +00:00
Christopher Ferris
55257d2b78 Small fixes for environment variables.
Fix all of the leaking of local variables by marking locals properly.

Fix a case where ANDROID_TOOLCHAIN_2ND_ARCH is set incorrectly.

Test: lunch'd aosp_angler-userdebug and then aosp_fugu-userdebug
Test: and verified ANDROID_TOOLCHAIN_2ND_ARCH is set properly after
Test: the first lunch and unset after the second lunch.
Test: Also attempt to build the two targets.
Change-Id: I49548e0d6654bfb1105a6ecaf2705825b9ddf3a5
2017-03-23 11:12:04 -07:00
Colin Cross
8873713f36 Add TARGET_PLATFORM_VERSION to lunch
lunch can now take combos in the form:
$TARGET_PRODUCT
$TARGET_PRODUCT-$TARGET_BUILD_VARIANT
$TARGET_PRODUCT-$TARGET_BUILD_VARIANT-$TARGET_PLATFORM_VERSION

If all 3 are not specified the unspecified ones will take the
default values provided by the build system (eng, and currently
OPR1).

In addition, error handling for invalid products, variants and
versions is moved to the build system.

Bug: 34972208
Test: build/make/tests/envsetup_tests.sh
Change-Id: Ib0aaa98633448ba9bd8df911704c9cb3a8ebbe85
2017-03-23 09:44:08 -07:00
Josh Gao
57795ff2a8 Merge "Fix stacks on 64 bit processes." am: aea79fa207 am: d3e865abbe
am: a941b547c0

Change-Id: I37a1e3a3ab37b7f8b35b2951815d6af8c96e0d5f
2017-03-01 21:21:58 +00:00
Josh Gao
310b6ff676 Fix stacks on 64 bit processes.
debuggerd64 doesn't exist anymore, `debuggerd $PID` works on both 32
and 64 bit processes.

Bug: http://b/35872661
Change-Id: I47be05c7ec346e5d657d06e6c3aff1723494639b
2017-03-01 11:34:58 -08:00
Simran Basi
5a5dc1eb39 Merge "Share *_OUT_TESTCASES environment variables with TF" am: 6eeba8f6ec am: 13ced77ea2 am: 78be58d869
am: 2de40b411a

Change-Id: I9c322935a7a8fb8c6a1c15ab0cf92ed17d2fc39f
2017-02-14 01:53:41 +00:00
Simran Basi
dd050ed1b3 Share *_OUT_TESTCASES environment variables with TF
Instead of having test tools search the OUT_DIR for the
testcases folders (of which there can be multiple different
targets), let's have these variables become part of the runtime
environment after a developer has run lunch.

Bug: 35322559
Test: . build/envsetup.sh ; lunch ; printenv | grep TESTCASES
Change-Id: Ic4addc2b9727ff717b2e595b9be224650e2f1b1d
2017-02-13 13:50:14 -08:00
Joe Onorato
c257831705 Merge "Add bit helper utility" 2016-10-21 17:55:42 +00:00
Joe Onorato
002a6c769d Add bit helper utility
- Add it to the base build (the first one in the hierarchy that includes
  the activity manager).
- Add tab completion commands to envsetup.sh

Test: . build/envsetup.sh ; make
Change-Id: Id24acaa0f17f198bda329016ff17170ad93624ec
2016-10-20 16:41:37 -07:00
Wei Wang
79056db4e0 Support Android.bp in mgrep
This patch enabled Android.bp in mgrep result

Bug: 32313127
Test: mgrep
Change-Id: Ie3171a10ab54322bfc3844d1f629c783286ec212
2016-10-20 14:31:05 -07:00
Colin Cross
127fceae06 Walk up tree to find makefiles in mma
Call findmakefile in mma to walk up the tree to find the nearest
makefile.  Fixes mma in subdirectories of directories that have
Android.mk or Android.bp files.

Change-Id: I6fa509171699071fc34a2a75dd7e191d4ddca31a
2016-09-01 15:35:57 -07:00
Colin Cross
4bfae06e71 Canonicalize mmm path
Canonicalize the mmm path relative to the top level before creating the
MODULES-IN-dir target.  Fixes cd frameworks/base; mmm -j .

Test: cd frameworks/base; mmm -j
Change-Id: If7bc321e8a87b76121f876bf4bc296b0f9b80578
2016-08-31 22:00:03 -07:00
Dan Willemsen
9fc9cac0ac Merge "Fix GET-INSTALL-PATH to work with Soong"
am: 6b9aa6938d

Change-Id: I9f433cb383846ec6ccb8e39be4b30110d60d54fd
2016-08-15 21:17:33 +00:00
Dan Willemsen
53e3899222 Fix GET-INSTALL-PATH to work with Soong
This was printing all of the Soong modules in addition to the modules
defined in the ONE_SHOT_MAKEFILE. So replicate what we did with
MODULES-IN-* with GET-INSTALL-PATH-IN-* and update all the users.

Bug: 30191725
Change-Id: Ib1e4bf00f64d7a3e8cd91f44eaf1ff82fdfbf162
2016-08-12 05:10:51 +00:00
Colin Cross
6f8244b62d Merge "Fix mm and mmm in Android.bp directories" am: 8ed91b6624
am: 323396993c

* commit '323396993c6651b4b98974df9e9d53118f27a840':
  Fix mm and mmm in Android.bp directories

Change-Id: I95d6bde7a0ea72b47779f1a5b0577ff423524b6f
2016-05-27 00:29:14 +00:00
Colin Cross
8642525726 Fix mm and mmm in Android.bp directories
mm and mmm were not parsing out/soong/Android.mk, so they were ignoring
all modules defined in an Android.bp file.  Always include
out/soong/Android.mk when ONE_SHOT_MAKEFILE is set, and convert the mm
and mmm functions to build MODULES-IN-$DIR instead of all_modules so
that only the subset of modules defined in out/soong/Android.mk for the
requested directory are built.

Bug: 28986194
Change-Id: I6e1ff8cacfc668a4154a0d5937450db840bb7a6b
2016-05-26 15:56:21 -07:00
Vishwath Mohan
9cdb6f1a31 Merge "Double quote some statements for zsh compatibility" am: 576fd3ebb9
am: 29c2c4db19

* commit '29c2c4db19c6c9f152a1c48aee368a3439cd195f':
  Double quote some statements for zsh compatibility

Change-Id: Id02db06a190370d18e3b7828a453cd16948d77c1
2016-05-23 22:29:50 +00:00
Vishwath Mohan
7d35f001e1 Double quote some statements for zsh compatibility
Two eval commands did not enclose their arguments in double quotes, and
this broke compatibility on zsh - preventing lunch from running to
completion. This CL adds the double quotes and fixes the issue.

Change-Id: I5ed884b455e2e61182f6c29fb807ed92372af039
2016-05-19 12:38:16 -07:00
Keun Soo Yim
46a259651f resolve merge conflicts of 72b82dc to nyc-dev-plus-aosp
Change-Id: I6e62226774584154ad1a802594e386fe7942504b
2016-04-25 15:27:21 -07:00
Keun Soo Yim
3d4847525f build rule change for VTS (vendor test suite)'s metadata files
Change-Id: I76b81529a97b672e08632703d2f6a2777ee8811e
2016-04-25 13:06:57 -07:00
Marie Janssen
32ec50a1f1 make croot slightly more useful
Have croot take an argument of a directory to end up in,
so we can jump around the tree even faster.

Change-Id: Ieb6a8d47fee0412006a11192b29ed44604961312
2016-04-22 16:25:29 -07:00
Chih-Hung Hsieh
a9a55c7c7e Call clang-tidy based on WITH_TIDY* variables.
* Call clang-tidy before every C/C++ compilation if
  (1) clang-tidy is found at $(PATH_TO_CLANG_TIDY)
  (2) $(my_clang) is true
  (3) LOCAL_TIDY is 1 or true, or
      LOCAL_TIDY is undefined and WITH_TIDY is 1 or true.
* clang-tidy is called with -checks=$(my_tidy_checks),
  which has default '-*,google*,-google-readability*'
  and can be overwritten by WITH_TIDY_CHECKS.
* LOCAL_TIDY_CHECKS is appended to $(my_tidy_checks)
* Extra flags are passed to clang-tidy through
  WITH_TIDY_FLAGS or LOCAL_TIDY_FLAGS.
* To quickly find and fix clang-tidy warnings, set $(WITH_TIDY_ONLY)
  to 1 or true to skip compilation of C/C++ files.
* Add a PHONY tidy_only target,
  which includes all $(cpp_objects) and $(c_objects).
* The 'mm' and 'mmm' functions are changed to call make with
  the 'tidy_only' target when WITH_TIDY_ONLY is true or 1.
  In that case, only clang-tidy is called for C and C++ files.

Bug: http://b/27779618
Change-Id: I8adcfff217d68af49849b79aacee7d7654cafb1b
2016-04-21 12:31:13 -07:00
Elliott Hughes
910a355947 Use ulimit -p rather than prlimit.
Neither is standard, but ulimit is toybox and therefore a bit more
regular and at least has help text.

Change-Id: Id7ba9adc9ca256b821d8060506010abef30dee28
2016-03-07 14:05:22 -08:00
Ying Wang
ac9092730e Small fixes.
Change-Id: Ia949ed0bc93edb78d0b029f3bd3dd584e9a00dc8
(cherry-pick from commit f0cb397a9e)
2016-03-04 14:02:25 -08:00
Ying Wang
7dfdb843b2 Speed up lunch/tapas/etc. shell utility functions.
1. Combined ~10 calls to the make build system to only one.
   We added a phony target "dump-many-vars" to the build system to dump
   "<var>=<value>" pairs. We then store the pairs as shell variables.
   With this cache get_build_var/get_abs_build_var can just return
   the shell variables instead of querying the build system.
2. Prune .git when we search for AndroidProduct.mks.

In internal source tree lunch time was reduced from ~15s to ~1.5s.

Bug: 27429759

(cherry picked from commit 08800fd905)

Change-Id: I862a0ec3c1aae97c552054dacec133e857042edf
2016-03-04 14:02:03 -08:00
Ying Wang
f0cb397a9e Small fixes.
Change-Id: Ia949ed0bc93edb78d0b029f3bd3dd584e9a00dc8
2016-03-04 13:56:23 -08:00
Ying Wang
08800fd905 Speed up lunch/tapas/etc. shell utility functions.
1. Combined ~10 calls to the make build system to only one.
   We added a phony target "dump-many-vars" to the build system to dump
   "<var>=<value>" pairs. We then store the pairs as shell variables.
   With this cache get_build_var/get_abs_build_var can just return
   the shell variables instead of querying the build system.
2. Prune .git when we search for AndroidProduct.mks.

In internal source tree lunch time was reduced from ~15s to ~1.5s.

Bug: 27429759
Change-Id: I24e88598f6fab598ef26518885fd5e86e71a772d
2016-03-04 11:01:57 -08:00
Chih-Hung Hsieh
42d5c292d9 Use new clang scan-build script.
The actual clang compiler called for static analysis is decided
by build/core/binary.mk, not the one given to --use-analyzer.

BUG: 13287788
Change-Id: I58105c20b56ce17ddf329a275c750d14284d1e25
2016-02-24 19:18:45 -08:00
Neil Fuller
fcf7c81a7f Revert "Revert "Make OpenJDK 8 the default""
Reapply the JDK 8 switch in internal builds.

This reverts commit 85bddfdedf.
2016-01-25 17:35:57 +00:00
Neil Fuller
1f495b865e Revert "Revert "Make OpenJDK 8 the default""
Reapply the switch to JDK 8 on aosp/master.

This reverts commit 85bddfdedf.

Change-Id: If2e8733ba78b007d37914c0512cd6be1bd4c1e69
2016-01-25 17:12:41 +00:00
Neil Fuller
85bddfdedf Revert "Make OpenJDK 8 the default"
Temporary revert to help out Brillo folks.
It will be resubmitted tomorrow.

This reverts commit 4495f6afb8.

Change-Id: Id378c7d3a6e72e9be50f9404b19d5763568987a5
2016-01-25 17:04:14 +00:00
Neil Fuller
4495f6afb8 Make OpenJDK 8 the default
To return to OpenJDK 7:
export LEGACY_USE_JAVA7=true

And run envsetup.sh/lunch again.

Bug: 25786468
Change-Id: I8e00591a24d13e3b8b6baaafe0fdff6536c58770
2016-01-25 10:19:25 +00:00