Commit graph

345 commits

Author SHA1 Message Date
Dan Albert
3895d5b246 Always link libdl with libc++ for the NDK.
Soong change to match
https://android-review.googlesource.com/#/c/274447/.

Test: make checkbuild tests
Bug: None
Change-Id: I25bfed6d99b97c406f40892ae4abc38f4e656e81
2016-09-14 16:50:48 -07:00
Dan Albert
83705c88d7 Use libcompiler-rt_extras with NDK builds.
Soong change to match
https://android-review.googlesource.com/#/c/274448/.

Test: make checkbuild tests
Bug: None
Change-Id: Ibc3732ce5b4a43a9151dca39a53572d248f86c45
2016-09-14 16:47:18 -07:00
Dan Willemsen
76ef5abd9a Fix lex/yacc path
Test: It no longer panics when there is a .yy/.ll file to build
Change-Id: I15c17d0df9449eabbede5d8afef955156baaba3d
2016-09-13 16:57:15 -07:00
Colin Cross
b4ce0ecad6 Remove cc.Customizer
Remove cc.Customizer, its functionality has been replaced by
android.PropertyCustomizer, and it is not used.

Change-Id: Ice32d554015b0800707bc042b187984f73df7979
2016-09-13 13:44:56 -07:00
Colin Cross
8b74d17220 Fix binaries and symlinks for prefer32
Track the primary architecture selected for each class based on the
module's multilib setting and the global config.  Fixes building
binaries with multlib set to first and DevicePrefer32BitExecutables set,
and fixes symlinks to binaries with multilib set to prefer32.

Bug: 31452121
Test: mmma -j art HOST_PREFER_32_BIT=true
Change-Id: I75094df42f3273f6d613e4058eaa565957174c28
2016-09-13 10:01:45 -07:00
Dan Willemsen
b1957a5021 Dynamically generate arch struct
Now we don't need to hardcode the list of OS/Arch/Variant/Features in
android/arch.go.

Change-Id: I0f9cc35d55baa31f036825fdf5b9dd30d076e56e
2016-09-08 13:50:36 -07:00
Colin Cross
42d1ba2d92 Add -z to valid multi-word linker flags
Art uses -z muldefs, allow it to be passed as a property.

Change-Id: Ief3b252d4b84762dbd49766ecdbebe00b333f523
2016-09-07 13:15:25 -07:00
Colin Cross
522e373a22 Allow CustomizeProperties to override linker
Allow CustomizeProperties to override the dynamic linker by setting a
DynamicLinker property.  Needed by art, which overrides the linker for
device-on-host testing.

Change-Id: Ia4cb5a85b9a995d8138da33eb13543addf3b38cc
2016-09-07 13:14:06 -07:00
Treehugger Robot
ca06cc331d Merge "[mips] Disable compact branch generation" 2016-09-06 22:30:59 +00:00
Nikola Veljkovic
3d6a38d601 [mips] Disable compact branch generation
Bug: http://b/31317834

Clang generates invalid beqc compact branch instruction. Disable
compact branch generation until clang is updated to include r278824,
which fixes the issue.

Error:
/tmp/backtrace_test-6a4a4f.s:6603: Error: invalid operands
`beqc $zero,$1,$BB31_ 6' clang++.real: error: assembler command
failed with exit code 1 (use -v to see in vocation)

Test for mips and mips64: cd system/core/libbacktrace && mma
Change-Id: I0b0f189e126621dbadb317ba711993e45004348d
2016-09-06 21:38:24 +00:00
Colin Cross
20780c80a0 Remove HostPrefer32BitExecutables
HOST_PREFER_32_BIT was used during the switch to 64-bit host tools to
keep the SDK building as 32-bit, but is never set any more.

Change-Id: I7c2db269d3f7fa1f4e0c022cbced789755a62d81
2016-09-02 14:06:30 -07:00
Treehugger Robot
72301d978a Merge "Add InstallerProperties to cc_defaults" 2016-09-01 21:45:56 +00:00
Josh Gao
1c0ee4ab6e Merge "Allow darwin targets to use -framework CoreFoundation." 2016-09-01 21:19:07 +00:00
Dan Willemsen
7424d61c95 Add InstallerProperties to cc_defaults
Test: Add relative_install_path to a cc_defaults
Change-Id: Id10f78afb3b82117b944b9b53fe7020fb672925b
2016-09-01 13:45:39 -07:00
Josh Gao
92da2b5e99 Allow darwin targets to use -framework CoreFoundation.
Bug: http://b/31245118
Change-Id: I5aa6162715b643af4a3073e6e403a6e1729f7c15
2016-09-01 11:53:42 -07:00
Dan Willemsen
28bda51400 Support shared cc_test_library
So that shared libraries can be installed under /data/nativetest[64] (or
the host equivalent)

Change-Id: I41b2860365985f36828bd4bf9b6dc651b210822c
2016-08-31 16:32:55 -07:00
Colin Cross
9d45bb78c5 Enable goma in soong
When the UseGoma flag is set, put all rules except the C compilation
rule in an externally defined local_pool, which will have been created
by kati.  The gomacc wrapper will already be in the CC_WRAPPER
environment variable.

Bug: 31142427
Change-Id: I699d4edff2e302eee398dad8692ceb14721a628c
2016-08-31 09:48:08 -07:00
Colin Cross
ecc53306b8 Merge "Add CC_WRAPPER support" 2016-08-30 19:34:01 +00:00
Treehugger Robot
8be0e0ffde Merge "Expose module suffixes to Make" 2016-08-30 02:10:52 +00:00
Dan Willemsen
1d577e25a7 Expose module suffixes to Make
These had only been exposed for shared libraries.

Also fixes testDecorator to not have two baseInstallers both being
written out to the Android.mk.

Bug: 31158868
Test: manual diff of out/soong/Android-aosp_flounder.mk
Test: Verify installed windows binaries end in .exe
Change-Id: I2bded5fb090117d48ade575b4438e0dedd2e3763
2016-08-29 16:02:05 -07:00
Treehugger Robot
27807b5415 Merge "Fix installation path for asan libraries" 2016-08-29 22:29:16 +00:00
Colin Cross
9461040154 Fix installation path for asan libraries
Check c.sanitize.inData() when deciding on install paths.
Don't set inData() for sanitized binaries.

Bug: 30773053
Change-Id: I24be75ccc1b25ae53f7f0a98d1632b30735d0931
2016-08-29 13:50:24 -07:00
Alistair Strachan
777475cb48 Add CC_WRAPPER support
Change-Id: If252c41ec1e3d708f599990c72be69dc8117ae14
2016-08-29 20:39:32 +00:00
Pirama Arumuga Nainar
15690c02d6 Switch to prebuilt clang-3217047
Bug: http://b/30421084
Change-Id: I8b65669ef9f60f85202295de117d3806d3a5b1f6
Test: Tested build, boot and common usage for several devices in AOSP
and internal branch.
2016-08-26 21:54:54 +00:00
Treehugger Robot
f5a50a8b17 Merge "Fix mac art build" 2016-08-26 01:22:07 +00:00
Colin Cross
7d82ab76dd Fix mac art build
-Wl,-read_only_relocs,suppress is required for libart to build to
avoid the error:
ld: illegal text-relocation to '__ZN3art7Runtime9instance_E' in out/soong/.intermediates/art/runtime/libart/darwin_x86_static/obj/art/runtime/runtime.o from '_art_quick_throw_null_pointer_exception' in out/soong/.intermediates/art/runtime/libart/darwin_x86_static/obj/art/runtime/arch/x86/quick_entrypoints_x86.o for architecture i386

Change-Id: Id9a0fda1dbf12a254f92419a21e5f290895ea62c
2016-08-25 16:54:53 -07:00
Colin Cross
1e7d3706d6 Add support for preferred arch symlinks
Add a symlink_preferred_arch property to binaries to allow compiling the
binary for multiple architectures and then creating a symlink to the
preferred archicture, for example dalvikvm32 and dalvikvm64, with
dalvikvm symlinked to dalvikvm64.

Test: mmma -j art/dalvikvm
Change-Id: Ied15f2be9d52c01006fe8ac207c175b78558eab1
2016-08-25 22:42:02 +00:00
Colin Cross
e1d764e369 Export DefaultsFactory
Add an exported DefaultsFactory so that external module types can extend
cc_defaults.  DefaultsFactory takes a variadic list of additional
property structures.  defaultsFactory remains as the module factory for
cc_defaults.

Change-Id: I03b450ab3a31625e7baca165d393a0007fb3e421
2016-08-22 17:08:06 -07:00
Colin Cross
389d2bb145 Merge "Support required property" 2016-08-17 17:06:22 +00:00
Evgenii Stepanov
af36db1178 Add ubsan_standalone library name to the toolchain.
and export the library name to make. Refactor the code a bit to avoid repeating the library name
multiple times.

Bug: 22033465
Test: Ran external/clang/build.py for aosp-llvm

Change-Id: I25eb3858eb92e1dd493b09524d559802551b2547
2016-08-15 17:05:04 -07:00
Chris Wolfe
998306e525 Support required property
This adds LOCAL_REQUIRED_MODULES to the generated Android.mk for any
dependencies in the "required" list of a module.

Change-Id: Ibcfe89dce7d247eb441af94e37388a59e71a75a9
2016-08-15 17:10:47 -04:00
Colin Cross
9883461664 Merge "Fix coverage sanitizer builds" 2016-08-15 18:12:23 +00:00
Colin Cross
33586f3b10 Fix cc_benchmark installs
cc_benchmark was not propagating the call to baseInstaller.install,
which resulted in no install location being set and the benchmarks
installed in out/.

Change-Id: I4399cd479d9cd7ec1b7332dd0d20a9ab3820b04e
2016-08-11 22:26:17 -07:00
Colin Cross
91169fe8ea Fix coverage sanitizer builds
Disable coverage for static binaries where address sanitizer is
disabled, and disable coverage in the mutator when disabling address
sanitizer.

Bug: 29188876
Change-Id: Ia1a21878c3f34cd295a6dec49608c412eb09e7b1
2016-08-11 16:54:01 -07:00
Treehugger Robot
aa99f84e57 Merge "Make BottomUpMutators parallel" 2016-08-11 21:35:24 +00:00
Colin Cross
e8a67a7c58 Make BottomUpMutators parallel
Append .Parallel() to all of the RegisterBottomUpMutator calls to tell
Blueprint it can run them in parallel.

Test: identical build.ninja, passes race detector
Change-Id: I969a0689522d4cba7c8ff51e2aa00fe2fd338a89
2016-08-11 13:20:16 -07:00
Dan Albert
d015c4ac1b Add support for NDK r13.
Test: make checkbuild
Bug: None
Change-Id: I6e7c92d6731be4ae47c7dc5e9444af08d338334b
2016-08-10 23:14:13 -07:00
Dan Albert
cdd4c24ff7 More fixes for decorator refactor.
Didn't catch these the first time because I hadn't done a clean build.

Test: rm -rf out && make ndk
Change-Id: Ia66ad614d2163272889ee6937a6449c44db16ac0
2016-08-08 14:45:24 -07:00
Dan Albert
705c84b9ee Fix ndk_library following decorator refactor.
https://android-review.googlesource.com/#/c/253603/ accidentally
dropped the ndk_library properties and was using the base cc
properties instead.

Change-Id: Ia2dcd767f98871dbdbbd9d0ff6d2a73b9b4889ac
2016-08-08 12:44:23 -07:00
Dan Albert
7fa7b2efd3 Don't generate intermediate NDK libraries.
It's better to clip to the existing versions here rather than build
the lower levels as if they existed.

cc.Module's begin() will now normalize the sdk_version to a valid
value for the given architecture so that doesn't have to be checked
later.

Test: make checkbuild with all other libc ndk_library changes
Change-Id: I2fa834f7a1ac3b03a0723291778d86207fcfda72
2016-08-05 16:48:36 -07:00
Colin Cross
b916a38233 Refactor cc modules to use decorators instead of inheritance
For example , instead of trying to have libraryLinker inherit from
baseLinker and libraryCompiler inherit from baseCompiler, create a
single decorator object that wraps both baseLinker and baseCompiler.

Test: Builds, no unexpected changes to build.ninja
Change-Id: I2468adaea8466c203a240259ba5694b8b1df7a52
2016-08-05 10:25:09 -07:00
Colin Cross
01344df46e Remove unused flags.Nocrt
Nocrt is handled through deps.CrtBegin/End, flags.Nocrt is unused

Change-Id: I8ab5313bb2eb3a00e336504d6dd3813350fbe14d
Test: soong builds
2016-08-05 10:22:29 -07:00
Dan Albert
7e9d295807 Auto-fill ndkMigratedLibs.
Change-Id: Ifb91f62eccb17dedb71c1a9a0f5c1471edbcbd44
2016-08-04 16:10:54 -07:00
Treehugger Robot
5c395b39b4 Merge "Check NDK API level link compatibility." 2016-08-04 23:07:16 +00:00
Dan Albert
9e10cd4746 Check NDK API level link compatibility.
Mixing NDK API levels is only supported when linking against something
equal or older.

Change-Id: I2c3022a3d75465b736f2e65160da3113cfd6e635
2016-08-03 14:31:25 -07:00
Dan Albert
2bc91ba549 Use the version script for ndk_library.
We were generating this, but not actually using it yet.

Test: `make ndk` with libc/libm migration patches, readelf generated
      libs.
Change-Id: I9aadf58307bc645b33cab5207409552c5046937a
2016-08-02 13:45:40 -07:00
Treehugger Robot
f77e8d7ffc Merge changes I0f73b41a,I0cd2f80c
* changes:
  Add a real parser for the version scripts.
  Add tag for "versioned=API".
2016-08-02 01:26:41 +00:00
Treehugger Robot
cab3d65445 Merge "Rename compiler, linker and installer methods to be unique" 2016-08-02 00:28:36 +00:00
Treehugger Robot
35ef8bdf32 Merge "Fix mac soong build" 2016-08-02 00:02:06 +00:00
Dan Albert
8bdccb9429 Add a real parser for the version scripts.
Bionic's version scripts are unfortunately complicated enough that the
naive processing I was doing before is not going to be sufficient.
Add a real parser/generator with a bunch of tests to fix this.

Test: cc/test_gen_stub_libs.py && make ndk
Change-Id: I0f73b41ade1e6cf4e31bf70ba43a743429ce770b
2016-08-01 16:12:40 -07:00