Commit graph

2311 commits

Author SHA1 Message Date
Patrice Arruda
58f381b714 Merge "Soong: Add synopsis to kernel_headers module under cc package."
am: f3c5e4816c

Change-Id: I8512002dde76af8f29d2d355079f375545a58d18
2019-04-26 22:29:30 -07:00
Patrice Arruda
cb5142c2d1 Soong: Add synopsis to kernel_headers module under cc package.
Added kernel_headers synopsis.

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis
      was added to the kernel_headers module.

Change-Id: I3d23fa2408c387883e62dea0742e72a96868ecb4
2019-04-26 15:19:21 -07:00
Colin Cross
34f52a3894 Merge "Fix tests with cc_binary_host on mac"
am: 588c1ee5f8

Change-Id: Ib708699fa03549edc180e038890b1262ca7476dc
2019-04-22 21:22:50 -07:00
Colin Cross
9c6241f768 Fix tests with cc_binary_host on mac
cc_binary_host on mac uses ctx.Config().HostSystemTool(), which needs
PATH in the test environment.  Copy it from the original environment.

Fixes: 129763458
Test: proto_test.go
Change-Id: I41c1acdceee7c35036148256adafb471871034df
2019-04-22 15:55:56 -07:00
Yi Kong
bafbdf4239 Merge "Switch to clang-r353983c"
am: db52ce88b0

Change-Id: I80437802cdb52b22bad0e2c67f57b596cc75451a
2019-04-19 16:30:25 -07:00
Yi Kong
09ecee7686 Switch to clang-r353983c
Test: TreeHugger
Bug: 129712936
Change-Id: I15f1db69de86ad8b9f2a0ae086fa2df87835948a
2019-04-19 16:23:18 +00:00
Pirama Arumuga Nainar
93b008e5b8 Merge "Revert "Revert "Enable lld for windows"""
am: cd9a1e2e73

Change-Id: Ib112923a601eebe26a95a5f8a714b2d862c2c6d6
2019-04-18 08:43:12 -07:00
Pirama Arumuga Nainar
cd9a1e2e73 Merge "Revert "Revert "Enable lld for windows""" 2019-04-18 15:26:42 +00:00
Jiyong Park
9e4d9a2ccd Merge "Fix: HideFromMake is not registered to llndk_* module types"
am: 587fb4de9a

Change-Id: If0bcd3d4a523a5867b28f787578dd192c8bfd68b
2019-04-17 07:58:32 -07:00
Jiyong Park
5e676fe9f0 Fix: HideFromMake is not registered to llndk_* module types
llndk_* module types are not initialized via cc.Module.Init(). As a
consequence, mutated properties like HideFromMake, etc. were not
registered and this caused problem when the mutated properties are set
by one of the mutators like the sanitizerMutator. Specifically, both
asan and non-asan variant of an llndk_header were both exported to Make
although HideFromMake was set to true for the non-asan variant.

Fixing this bug by explicitly registering BaseProperties struct which
contains the mutated properties.

Bug: 130652996
Test: Following works:
$ lunch aosp_cf_x86_pasan-userdebug
$ mkdir frameworks/native/test && mkdir frameworks/native/test/include
$ cat > frameworks/native/test/Android.bp
llndk_headers {
    name: "test_headers",
    export_include_dirs: ["include"],
}
^D
$ SANITIZE_TARGET='address' make

Change-Id: I44e3668460448d79382617df61171b0ab5b4d98d
2019-04-17 13:17:47 +09:00
Pirama Arumuga Nainar
6d8c0a50bc Revert "Revert "Enable lld for windows""
This reverts commit 61166dc047.

One difference from the earlier change is that import libraries are now
using the '.lib' extension instead of '.a' to prevent clash with
AdbWinApi.a.

Bug: http://b/110800681

The following flags that the binutils linkers support are not
available in lld for Windows:
  -soname
  --no-undefined
  -rpath

Windows also uses "import libraries", which are stub libraries used only
for linking.  The binutils linkers accepted a DLL and treated them as an
import library.  But lld issues the following error:

  lld-link: error: ...DLL: bad file type. Did you specify a DLL instead
  of an import library?

To resolve this, pass '-out-implib=libFoo.lib' to lld when linking
libFoo.dll to get lld to generate an import library.  Add libFoo.lib as
an implicit output to the 'ld' build rule.

Rewrite the shared libraries when building a library/binary to use the
import library instead of the DLL.  As a side-effect, this also uses the
newly-created AdbWinApi.lib that's alongside
development/host/windows/prebuilt/usb/AdbWinApi.dll

Test: Run Windows tests (go/android-llvm-windows-testing) and check
absence of regressions.  Also check that the following commands pass:
      $ adb.exe devices
      $ fastboot.exe devices

Change-Id: I34e07d345e0207086ac8e8ea12525d8c322b20fd
2019-04-16 16:22:03 -07:00
Patrice Arruda
500f586c53 Merge "Soong: Add synopsis to ndk_* modules."
am: 8196356248

Change-Id: Ibc6feab13e7b3bc08983def893d15a770ab61451
2019-04-16 09:28:43 -07:00
Patrice Arruda
8196356248 Merge "Soong: Add synopsis to ndk_* modules." 2019-04-16 16:14:46 +00:00
Patrice Arruda
7ac9db2012 Merge "Soong: Add synopsis to several modules under the cc package."
am: 3cbdeddaf0

Change-Id: Ideab6818d25905e1484f4ce0b5253a98248ca562
2019-04-16 09:07:48 -07:00
Patrice Arruda
3cbdeddaf0 Merge "Soong: Add synopsis to several modules under the cc package." 2019-04-16 15:43:55 +00:00
Dan Willemsen
e71c0691ad Convert yacc to a single RuleBuilder rule
am: 4e0aa23dd3

Change-Id: I5d629683fa99cbbc0b6f97517a1cb9c5e8c6bb89
2019-04-15 17:24:18 -07:00
Dan Willemsen
4e0aa23dd3 Convert yacc to a single RuleBuilder rule
So that <module>/gen/yacc/... is (re)created by a single rule, previous
files are removed, and location.hh is in the build graph when it is
produced.

Test: treehugger
Change-Id: I2f6e47ea07f315e10ae1cb8ad50697e7123d0285
2019-04-15 14:52:05 -07:00
Christopher Ferris
e0728ccb3a Merge "Do not re-export _Unwind_XXX symbols."
am: 41eed99dc7

Change-Id: I71ecd9be29895f799728d341e5407043e4af1812
2019-04-11 21:58:45 -07:00
Christopher Ferris
c3a1e22060 Do not re-export _Unwind_XXX symbols.
Bug: 130267141

Test: All system shared libraries do not contain global _Unwind_XXX symbols.
Change-Id: I79673753bb8197041bfe8ffb016d9f5fdf4cada5
Merged-In: I79673753bb8197041bfe8ffb016d9f5fdf4cada5
(cherry picked from commit cf78867417)
2019-04-11 17:54:48 -07:00
Logan Chien
09b2c81f09 Merge "Add --llndk for NDK libs as well"
am: b10243dc4e

Change-Id: I4756fb19c5ac88c1897f19f5217326c337a45c86
2019-04-11 09:51:48 -07:00
Logan Chien
62f1f9488e Add --llndk for NDK libs as well
This commit add `--llndk` to the command line option for
`create_reference_dumps.py` as well.

Bug: 124620774
Bug: 130324828
Test: lunch aosp_arm64-userdebug && make
Change-Id: I117864209b8cf8c934fd3aa1086b7691c1c449e3
2019-04-11 05:40:57 +00:00
Patrice Arruda
6ea42118f2 Soong: Add synopsis to ndk_* modules.
Added synopsis to the following modules under cc package:
    * ndk_headers
    * ndk_library
    * versioned_ndk_headers
    * preprocessed_ndk_headers

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis was
added to each of the module.

Change-Id: I2146919528cf039ed9327b3358de5b1bdb28275a
2019-04-09 18:50:44 -07:00
George Burgess IV
ea2835bb72 Merge "Remove our clang-tidy wrapper"
am: 45a5a287af

Change-Id: Ie120d7f322039f6b382769fb68fd1785b3902096
2019-04-05 17:17:25 -07:00
George Burgess IV
c4624c0189 Remove our clang-tidy wrapper
Looks like the reason for it existing has been fixed. It should probably
just be removed.

Bug: None
Test: WITH_TIDY=1 m

Change-Id: I770b2fec4ac44f265ff31731c9c0bd4da14d5b0f
2019-04-04 17:58:00 -07:00
Patrice Arruda
efd2678e8c Merge "Soong: Add synopsis to vndk_prebuilt_shared module under cc package."
am: fc453c79f2

Change-Id: Ieffcdfeb0fe47af75b0344e0bb2428545ec120fe
2019-04-04 12:01:10 -07:00
Treehugger Robot
fc453c79f2 Merge "Soong: Add synopsis to vndk_prebuilt_shared module under cc package." 2019-04-04 18:51:11 +00:00
Vic Yang
fba522bd64 Merge "Blacklist more libraries from no-vendor-variant VNDK"
am: f3f1467051

Change-Id: Iba0a4248bfc4e72e470849e3878ca26d9d0906b0
2019-04-04 01:50:54 -07:00
Treehugger Robot
f3f1467051 Merge "Blacklist more libraries from no-vendor-variant VNDK" 2019-04-04 08:33:02 +00:00
Colin Cross
a1c57b4664 Fix package path of android/soong/android pctx
am: cc0ce80ed5

Change-Id: Ia266af299fe1a0c8b2f9467c845ceb61cb8236bc
2019-04-03 21:21:10 -07:00
Colin Cross
cc0ce80ed5 Fix package path of android/soong/android pctx
android/soong/common was renamed to android/soong/android long
ago, but the pctx package path was still "android/soong/common".
This required all users of rules defined in android/soong/android
to import "android/soong/android" and then
pctx.Import("android/soong/common").

Test: m checkbuild
Change-Id: I20d096522760538f7cfc2bec3d4bfeba99b275d4
2019-04-04 03:59:34 +00:00
Christopher Ferris
2000f21705 Make libc_scudo always go first.
am: 134f8f6f00

Change-Id: Ib7b568406b3822ece9cf0825957d7a8b8ff6aa01
2019-04-03 16:09:15 -07:00
Christopher Ferris
134f8f6f00 Make libc_scudo always go first.
In addition, add Shared_libs to malloc_not_svelte.

Bug: 123689570

Test: Verified that libc_scudo is first wherever it is added.
Change-Id: Ibdc5dbd019a382630a727c270f846aa4446f8d99
Merged-In: Ibdc5dbd019a382630a727c270f846aa4446f8d99
2019-04-03 14:54:12 -07:00
Patrice Arruda
ea3fcdffc2 Soong: Add synopsis to several modules under the cc package.
Added synopsis to the following modules under cc package:
    * llndk_headers
    * llndk_library
    * vendor_public_library
    * toolchain_library

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis was
added to each of the module.

Change-Id: I0f6e3b01b478d46afeacbe6fc8e05f96d6217c7d
2019-04-03 14:43:03 -07:00
Patrice Arruda
ad0315089c Soong: Add synopsis to vndk_prebuilt_shared module under cc package.
Added vndk_prebuilt_shared synopsis.

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis
      was added to the vndk_prebuilt_shared module.

Change-Id: Id40246de65985b8b3b357744083c1d32c872e2ff
2019-04-03 09:07:51 -07:00
Josh Gao
87fd9dec38 Revert "Enable lld for windows"
am: 61166dc047

Change-Id: Ib2088c56f593472c41efcf69ef0ae309db95cd9a
2019-04-02 20:45:04 -07:00
Josh Gao
61166dc047 Revert "Enable lld for windows"
This reverts commit 3c21c0b1d9.

Reason for revert: appears to break AdbWinUsb.dll usage by fastboot (and adb?)

Bug: http://b/129420419
Bug: http://b/110800681
Change-Id: I36d6d87f2e830e08e257ab42d470e49cdbb95819
2019-04-03 00:59:14 +00:00
Vic Yang
db1cb10a50 Blacklist more libraries from no-vendor-variant VNDK
These VNDK libraries did not have both core and vendor variants built
for the cuttlefish target when I initially build the list, and thus
they were missed.  Add them back.

Bug: 119423884
Test: Build walleye with no-vendor-variant VNDK enabled.
Change-Id: If446256251eb2e185b0cdba95ce5c1e4f1fb8820
2019-04-02 13:10:23 -07:00
Colin Cross
a9ff20226e Skip failing test on mac
am: 9a4f3f7ea8

Change-Id: Ic9475bef508ba636528d17db5e17d739a734232b
2019-04-02 10:25:40 -07:00
Colin Cross
9a4f3f7ea8 Skip failing test on mac
Tests with cc_binary_host fail on mac, disable for now.

Bug: 129763458
Test: TestProto
Change-Id: Icea24ac6ffba4c5c047296cb3997a5efa95e16ee
2019-04-02 10:02:04 -07:00
Colin Cross
91c063cfdc Add support for protoc plugins
am: fe17f6f0e8

Change-Id: I7dabf4b788925fce8b477eb3c7f9e90a5f986945
2019-04-02 09:55:06 -07:00
Colin Cross
61918685aa Move proto compilation to RuleBuilder
am: 19878da6a0

Change-Id: I44eed0735702ea6fbef57753d8eec078ad3a131e
2019-04-02 09:54:59 -07:00
Colin Cross
fe17f6f0e8 Add support for protoc plugins
Add a proto.plugin property to allow specifying a custom protoc
plugin to generate the code.

Fixes: 70706119
Test: m am StreamingProtoTest
Change-Id: I1ecdd346284b42bbcc8297019d98d2cd564eb94c
2019-04-02 16:38:55 +00:00
Colin Cross
19878da6a0 Move proto compilation to RuleBuilder
Using blueprint.Rule for protoc commands was causing code duplication
because there was no good way to run the same protoc for cc, java and
python but then run custom source packaging steps for java and python.
Move most of the code into a common function that returns a
RuleBuilder, and then let java and python add their own commands at
the end of the rule.

Bug: 70706119
Test: All Soong tests
Test: m checkbuild
Change-Id: Ic692136775d273bcc4f4de99620ab4878667c83a
2019-04-02 16:38:47 +00:00
Patrice Arruda
57522e4123 Merge "Soong: Add synopsis to cc_prebuilt_* modules."
am: 6e1c3faed5

Change-Id: I57ffbbe82c03113fffbc2fa766f8a4517d684cb7
2019-04-02 08:16:04 -07:00
Patrice Arruda
3554a98e4f Soong: Add synopsis to cc_prebuilt_* modules.
Added synopsis to the following modules under cc package:
    * cc_prebuilt_binary
    * cc_prebuilt_library_shared
    * cc_prebuilt_library_static

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis was
added to each of the module.

Change-Id: I2ec284eb600f28d5c7f00254f441a3cc5fb684cc
2019-04-01 17:25:41 +00:00
Colin Cross
0a31c21da0 Merge "Restat clang linker outputs"
am: 51e265c5dd

Change-Id: I7f95695550cc51a5043cecab62f7907dffe1ef82
2019-03-31 11:55:47 -07:00
Colin Cross
36ae135434 Restat clang linker outputs
clang -Wl,--out-implib doesn't update its output file if it hasn't
changed, always restat the outputs.

Fixes: 129553377
Test: m checkbuild && m checkbuild
Change-Id: I2cb19e1b8280fd69c8a9b2143f55760ec05630f8
2019-03-30 00:03:24 +00:00
Pirama Arumuga Nainar
865ad54f90 Include libprofile-extras to all coverage variants
am: 65c95ff1fb

Change-Id: I74057c0921eaa76c8016d0bb8f81abaf0eb50ed8
2019-03-29 09:17:15 -07:00
Pirama Arumuga Nainar
312b5f4407 Refactor coverage support
am: ee30d5e132

Change-Id: I859c7e6c535f1d99d26fa8148bc24a930933cd39
2019-03-29 09:17:04 -07:00
Pirama Arumuga Nainar
65c95ff1fb Include libprofile-extras to all coverage variants
Bug: http://b/128524141

Include libprofile-extras (defined in system/extras/toolchain-extras) to
all modules that need a coverage variant.  Also add
'-uinit_profile_extras' when linking with coverage.  This causes the
setup code in libprofile-extras to be linked into binaries/libraries
with coverage enabled.

We add the static library to the non-coverage variants as well but is a
no-op for them (since the '-u...' flag is not added for them).

Adding this dependency creates several circular dependencies since
coverage variants were being created for other module types that never
had any compilation or linking done during the build.  This change stops
creating coverage variants for toolchain_library, cc_prebuilt_library_*,
cc_library_headers module types (by adding a function to the linker
interface to specify whether native coverage is enabled).

Test: m NATIVE_COVERAGE=true COVERAGE_PATHS=*
Test: blueline_coverage target in internal branch (using forrest)
Change-Id: I5db876eb953639a55ba007248dd24e497f987730
2019-03-29 08:56:42 -07:00