Commit Graph

1778 Commits

Author SHA1 Message Date
Treehugger Robot cc2746d1f2 Merge "Add OutputFile to cc.Module" 2018-09-17 20:03:09 +00:00
Dan Willemsen 2e224cae8e *_OUT_INTERMEDIATE_LIBRARIES has been removed from Make
So LOCAL_COPY_TO_INTERMEDIATE_LIBRARIES is no longer necessary. And just
export the object paths directly to make instead of copying into the
intermediate libraries directory.

Test: m
Change-Id: Iba1523aec642fc81e9bf61da3125f714e91cd557
2018-09-15 10:46:17 -07:00
Colin Cross db52052a65 Don't pass -pie for Windows binaries
am: 446c666672

Change-Id: Ib25160a25da26811ea34435e2d7dc532b3eaf7c3
2018-09-14 18:23:30 -07:00
Colin Cross 446c666672 Don't pass -pie for Windows binaries
Passing -pie to clang for Windows binaries causes a warning:
clang-7: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]

Bug: 115776263
Test: m checkbuild
Change-Id: Ie502a05dac32c192c38953c684dc80d1db24b792
2018-09-14 23:02:31 +00:00
Jiyong Park c20eee3605 Add OutputFile to cc.Module
APEX needs to know the location of the output file of cc.Module to copy
it to an intermediate directory and package there.

Bug: 112672359
Test: m apex.test
Change-Id: Iaa19b29c2859df96f50716001dbd57df3f596050
2018-09-13 12:45:00 +09:00
Colin Cross 83c49af8c2 Merge "Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules"
am: b1dff80c0e

Change-Id: I8c36a86c4bcfabe542583843794c1bb0329ce1ce
2018-09-11 15:01:30 -07:00
Colin Cross e3d6836f02 Merge "Enable toc support for Darwin and Windows"
am: d3ab493fa0

Change-Id: I5041fd3a6fc03ddd2f143de275755d7e5efd8a8d
2018-09-11 15:01:14 -07:00
Colin Cross b60190a4f8 Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules
Export Soong cc modules to Make using a new soong_cc_prebuilt.mk that
bypasses all of prebuilt_internal.mk, dynamic_binary.mk and binary.mk.
This also means that stripping is handled in Soong instead of Make.

Relands If9008c50920779048480f5eeeb0084f26006c998 with fixes for
mac builds.

Bug: 113936524
Test: m checkbuild
Change-Id: I9710ff57f0793f36eb889eabd08bd60a365a88dd
2018-09-10 23:12:12 -07:00
Colin Cross b496cfd9d2 Enable toc support for Darwin and Windows
Bug: 113936524
Test: m checkbuild
Change-Id: I0f2030ad75daae2cbe44e8cbedad329d33df55f7
2018-09-10 23:12:11 -07:00
Colin Cross 091f645959 Merge "Revert "Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules""
am: cf7d5ab6d6

Change-Id: I27654214955fadaa4e454f5fe09158d76782da1c
2018-09-10 14:44:12 -07:00
Colin Cross cf7d5ab6d6 Merge "Revert "Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules"" 2018-09-10 21:36:38 +00:00
Colin Cross cb9342eabd Revert "Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules"
This reverts commit e2874cd99d.

Reason for revert: broke mac builds
Bug: 113936524

Change-Id: Id0311d6b202b18e80953da632133548d56ed851a
2018-09-10 21:35:34 +00:00
Colin Cross 3a088e42bf Export build/soong/scripts/strip.sh to Make
am: d2e92da626

Change-Id: I5486bd67466812073d122d7aa0a6dbf018fa87b5
2018-09-10 12:46:53 -07:00
Colin Cross 39e8b30068 Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules
am: e2874cd99d

Change-Id: Idc3276796b5a8b71d3e70282c0538b7a7c81ac6b
2018-09-10 12:44:46 -07:00
Colin Cross d2e92da626 Export build/soong/scripts/strip.sh to Make
Bug: 113936524
Test: m checkbuild
Change-Id: I2d3d1e579b05117bf377852abedd5fc6d320401f
2018-09-10 11:05:01 -07:00
Colin Cross e2874cd99d Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules
Export Soong cc modules to Make using a new soong_cc_prebuilt.mk that
bypasses all of prebuilt_internal.mk, dynamic_binary.mk and binary.mk.
This also means that stripping is handled in Soong instead of Make.

Bug: 113936524
Test: m checkbuild
Change-Id: If9008c50920779048480f5eeeb0084f26006c998
2018-09-10 11:04:01 -07:00
Evgenii Stepanov 44d6881b44 (soong) Add -fsanitize= argument to assembly flags.
am: dbf1d4f884

Change-Id: Ie3e48deef9b255b3b1e2ed12560e899c1b1baf0d
2018-09-07 10:41:30 -07:00
Evgenii Stepanov dbf1d4f884 (soong) Add -fsanitize= argument to assembly flags.
It allows use of sanitizer preprocessor macros (like __has_feature())
in assembly files.

Bug: 112438058
Test: SANITIZE_TARGET=hwaddress
Change-Id: Id3fed5492ab9473cbb13cd6c0485302412e8b1de
2018-09-07 10:23:07 -07:00
Dan Willemsen d877b27eea Merge "Remove GCC support from Make"
am: 2f7e3bb4d0

Change-Id: I32d17dca901bfc7b32f9305fee63f3ebbb58835a
2018-09-06 19:58:11 -07:00
Treehugger Robot 2f7e3bb4d0 Merge "Remove GCC support from Make" 2018-09-07 02:42:27 +00:00
Colin Cross aae66fa8d2 Merge changes Ifd529f88,I2fb4429a,I67ec2e94
am: 37710d3c71

Change-Id: I4e248297e225dc32c98aba008ee6ec74ff2f47a6
2018-09-06 16:31:11 -07:00
Dan Willemsen f640dbcd1f Remove GCC support from Make
We need to keep support in Soong until toolchain_library no longer uses
GCC.

Test: out/build-aosp_arm64.ninja is the same before/after
Test: build_test on downstream branches
Change-Id: Ib78bcd6d5544afc3a3164f65fa72a3f08b2acf29
2018-09-06 22:37:54 +00:00
Colin Cross 6b0afa58fa Merge changes I3648c914,I47dec958,Ia20f8198
am: ca126c70d7

Change-Id: I1b2ce72203aeff7135a025baf68b946372ed5b66
2018-09-06 00:13:14 -07:00
Colin Cross ed064c0b1f Fix logic for adding gnu debuglink to match Make
Only add gnu debuglink on userdebug builds to match Make, and don't
add it when using minidebuginfo, which doesn't support it.

Bug: 113936524
Test: m checkbuild
Change-Id: Ifd529f88d63afa5627172fb6ea612aea77159f40
2018-09-05 16:30:16 -07:00
Colin Cross 9a959cd519 Add Soong support for stripping all symbols
Bug: 113936524
Test: m checkbuild
Change-Id: I2fb4429aee689dc6a99dc973b37575a114e46be6
2018-09-05 16:30:16 -07:00
Colin Cross 88f6fefeb4 Add stripping and toc support to Soong cc_prebuilt modules
Bug: 113936524
Test: m checkbuild
Change-Id: I67ec2e94d349924c3e209939030b204fdaff9c47
2018-09-05 16:30:16 -07:00
Colin Cross 22f3795dca Remove relocation packer
The relocation packer prebuilt is gone, remove the references to it.

Bug: 110715614
Test: m checkbuild
Change-Id: Ia20f8198e4fc206f4995dd5168c811dac7c9df89
2018-09-05 16:30:11 -07:00
Colin Cross 728adf6a81 Don't clear flags in prebuiltLibraryLinker.linkerFlags
am: 1ab10a7310

Change-Id: Ib1890cfc3d84694ac5fca945589efb00be9814d6
2018-09-04 12:33:43 -07:00
Colin Cross 1ab10a7310 Don't clear flags in prebuiltLibraryLinker.linkerFlags
linkerFlags takes the current flags struct, it should return it
unmodified if it has nothing to do, not return an empty one.

Bug: 113837811
Test: m SANITIZE_TARGET=address
Change-Id: I35ec260f49c832a5b50ff77395eda618679e6ef9
2018-09-04 11:02:37 -07:00
Yi Kong ec11aef9cd Merge "Add BuiltinsRuntimeLibrary"
am: e944600978

Change-Id: I009085ecc3b340db8a92154ead624c5059ffdcdc
2018-08-31 17:45:16 -07:00
Yi Kong e944600978 Merge "Add BuiltinsRuntimeLibrary" 2018-09-01 00:09:19 +00:00
Yi Kong 4980e02f43 Merge "Prebuilts shouldn't inherit linker interface"
am: 1662e3c76d

Change-Id: I04f31fc040d5ec8fe3aa2d4db99bfcc3168fdf62
2018-08-31 15:38:53 -07:00
Yi Kong 1662e3c76d Merge "Prebuilts shouldn't inherit linker interface" 2018-08-31 22:25:00 +00:00
Yi Kong 924adc4d17 Add BuiltinsRuntimeLibrary
... and rename SanitizerRuntimeLibrary to LibclangRuntimeLibrary since
some of them are not sanitizers.

Bug: 29275768
Test: m
Change-Id: Id638adea42d22b02438fce26120aa155bea14d42
2018-08-31 14:53:54 -07:00
Logan Chien 105812f5d7 Check ABI stability of all NDK libs
am: f4b79c684a

Change-Id: I04b790128b034373625ec47ecf1b51a929a7063a
2018-08-30 22:49:58 -07:00
Logan Chien f4b79c684a Check ABI stability of all NDK libs
This commit extends ABI stability checks to all NDK shared libs
(including the framework-related ones such as libandroid.so).

Bug: 112404572
Bug: 79576032
Test: make findlsdumps  # (and check the output)
Change-Id: I0147c60ce0c90d187f85b996911d98326a0c37ae
2018-08-31 02:55:28 +00:00
Colin Cross 2ddd61f238 Merge "Skip DepsMutator on disabled modules"
am: 418d261481

Change-Id: Id3f90a67abae7483b1b0697790854aff0a8d5bda
2018-08-30 16:21:52 -07:00
Pirama Arumuga Nainar ecdcb62d22 Use Windows security mitigation features: ASLR, DEP
am: 191f646295

Change-Id: Ie182452ca1ac3a9fb959fd887421763445c646e4
2018-08-30 16:21:36 -07:00
Treehugger Robot 418d261481 Merge "Skip DepsMutator on disabled modules" 2018-08-30 22:56:32 +00:00
Yi Kong 0098166cb4 Prebuilts shouldn't inherit linker interface
Prebuilts doesn't go through linking stage, thus it should not inherit
any dependencies or flags from linker.go.

Test: m checkbuild
Bug: 29275768
Change-Id: I1f1dc5d65c2fc2dd905e8df44e08d5c83b224d0c
2018-08-30 14:33:06 -07:00
Colin Cross 6db4a6a7d9 Skip DepsMutator on disabled modules
Dependencies of disabled modules may not have the right variations
for calling AddVariationDependencies, skip DepsMutator completely
on disabled modules.

Bug: 112707915
Test: m checkbuild
Test: prebuilts/build-tools/build-prebuilts.sh
Change-Id: I702e591437e5e6eb9f91f3b7eb32bacc4bd5d249
2018-08-30 19:54:37 +00:00
Pirama Arumuga Nainar 191f646295 Use Windows security mitigation features: ASLR, DEP
Bug: https://issuetracker.google.com/36952278
Bug: http://b/113171785

From
https://android-review.googlesource.com/c/platform/system/core/+/737292:

The --dynamicbase linker flag enables use of Address Space Layout
Randomization (ASLR) on Windows Vista and newer. It causes the code
segment / module to be loaded at unpredictable addresses to make
exploits harder to construct.

The --nxcompat linker flag enables use of Data Execution Protection
(DEP) on Windows XP SP2 and newer. It causes the process to be killed if
the process tries to execute code on memory pages not marked executable.
This makes exploits harder to construct because the stack is then not
executable, other data pages aren't, etc.

These bits are already set on AdbWinApi.dll and AdbWinUsbApi.dll.

--high-entropy-va provides improved ASLR.

Credit: Spencer Low for doing the initial work at
https://android-review.googlesource.com/c/platform/system/core/+/737292.

Test: Verify that DLLCharacteristics reported by 'objdump -x' is:
      0x140 for 32-bit and 0x160 for 64-bit.  Also verified trivial use
      cases under Wine.

Change-Id: I1b898cd36c7c627916dae9ce7dfd1c27de1e3c59
2018-08-30 12:54:33 -07:00
Colin Cross 8155b5e83f Enforce dependencies have right architecture
am: 42d48b7b8b

Change-Id: Ia68fc583549e503da719a40c83a37002fe33bca5
2018-08-30 11:25:59 -07:00
Colin Cross 42d48b7b8b Enforce dependencies have right architecture
ctx.AddDependency will succeed if the named dependency only has a
single variant, even if that variant is the wrong architecture.
Use ctx.AddVariationDependency(nil, ...) instead, which requires
that all variations of the calling module match the dependency.

Bug: 112707915
Test: no change to out/soong/build.ninja
Test: using a device dependency in a host java module is an error
Change-Id: I70b661a57d4412eb63b8c9841febfb756e9e025d
2018-08-30 16:31:02 +00:00
Steven Moreland fa287846ea Add libbinder_ndk to the NDK.
Bug: 111445392
Test: atest android.binder.cts.NdkBinderTest
Change-Id: If7e25f6e856524c531c41dacf3e7f798f42cc7a5
2018-08-29 21:45:51 -07:00
Dan Willemsen d83ba979f4 Clean up darwin cc toolchain
am: e97e68a05a

Change-Id: I3adf41a6b8eab2bee60c518fb9465ad70de9d9e5
2018-08-28 21:24:07 -07:00
Dan Willemsen e97e68a05a Clean up darwin cc toolchain
Remove the ability for Soong to build 32-bit darwin code. We've already
disabled this in Make, this is just removing the unused bits in Soong
and simplifing the toolchain config.

Test: m host
Test: build/soong/scripts/build-ndk-prebuilts.sh
Change-Id: I968c5d98bdf162297d639f7988918dadb7ba6e07
2018-08-28 20:08:50 -07:00
Dan Willemsen 58f6fed8e2 Merge "Support Mac 10.14 SDK"
am: 6dcc81c3c6

Change-Id: I0231c56f893d13be29a571669df7604f91a5873f
2018-08-28 19:04:43 -07:00
Treehugger Robot 6dcc81c3c6 Merge "Support Mac 10.14 SDK" 2018-08-29 01:53:42 +00:00
Evgenii Stepanov 9db38882cf Merge "Pass hwasan extra cflags to make."
am: 9f7cb4e22c

Change-Id: Id3b97cefdaa2212c58565e66dab64b9e8e5a052c
2018-08-28 17:18:10 -07:00
Dan Willemsen 5a050c0183 Support Mac 10.14 SDK
Now that we don't compile 32-bit binaries, this seems to work, at least
in Xcode 10 beta 6.

Test: m checkbuild host
Change-Id: I61a98a3c31b331d6d01cd633f8d949fad86047cb
2018-08-28 16:48:45 -07:00
Evgenii Stepanov a6302337c8 Pass hwasan extra cflags to make.
Bug: 112438058
Test: SANITIZE_TARGET=hwaddress
Change-Id: If57e5f4cf78037992936ce94a98f017676b7e74b
2018-08-28 13:51:05 -07:00
Chih-hung Hsieh 4cef9cbbad Merge "Define PATH_TO_CLANG_TIDY_SHELL for build/make rules."
am: 4b42edbca0

Change-Id: Ie19f560057ef5d3e2ef0671e8af42dd3d1261626
2018-08-28 12:21:36 -07:00
Chih-hung Hsieh 4b42edbca0 Merge "Define PATH_TO_CLANG_TIDY_SHELL for build/make rules." 2018-08-28 18:18:32 +00:00
Jiyong Park 58918f3e69 Merge "link type of recovery variant of a vendor module should not be native:vendor"
am: c842742f5d

Change-Id: I934a5dcb8dfb84d3e1e044ada1d2c2dd25c3fbff
2018-08-28 07:27:46 -07:00
Jiyong Park 5baac54d58 link type of recovery variant of a vendor module should not be native:vendor
This CL fixes a bug that when a module is configured as 'vendor: true' &&
'recovery_available: true', the link type of the recovery variant of the
module is incorrectly set to 'native:vendor'. This was because,
androidmk.go emits 'LOCAL_PROPRIETARY_MODULE := true' whenever
Proprietary property is set to true, regardless of whether it is a
recovery variant or not. This in turn makes LOCAL_USE_VNDK := true for
the module which in turn causes the link type to be 'native:vendor'.

Fixing the bug by resetting the properties like Proprietary, Vendor,
Soc_specific, etc. for the recovery variants.

Bug: 113277544
Test: m -j (test added)
Change-Id: I5d6ae76e46ef8fcd9204d386d0809862a7b0ff7e
2018-08-28 10:03:17 +09:00
Chih-Hung Hsieh b699c43f89 Define PATH_TO_CLANG_TIDY_SHELL for build/make rules.
* PATH_TO_CLANG_TIDY_SHELL is ${config.ClangTidyShellPath},
  wich is "build/soong/scripts/clang-tidy.sh"

Bug: 110538415
Test: build with WITH_TIDY=1
Change-Id: I27d7be095c998583fa9ad4d705aa1332bd018140
2018-08-27 16:19:59 -07:00
Ryan Prichard f867f36e2f Merge "NDK sysroot: include each license file only once"
am: 09664bd9a5

Change-Id: I4f84c5adb80b0e368c881ffe53cf0f50bf24e9e4
2018-08-24 15:53:23 -07:00
Treehugger Robot 09664bd9a5 Merge "NDK sysroot: include each license file only once" 2018-08-24 22:40:32 +00:00
Ryan Prichard b1c9d40b6f NDK sysroot: include each license file only once
bionic/libc/NOTICE file is 6000 lines long and is referenced by 10
modules in bionic/libc/Android.bp. We're currently including 10 copies of
the license file, which makes it hard to view a "platform prebuilts" CL
in Gerrit.

For example, click "Expand All" on:
https://android-review.googlesource.com/c/platform/prebuilts/ndk/+/730825

Bug: none
Test: m out/soong/ndk.timestamp
Change-Id: I857e70d7d900688532ab988800c98bbd0899cc31
2018-08-24 13:28:04 -07:00
Chih-Hung Hsieh 1cc0227af2 Remove flto dependent flags when -flto is removed.
am: 9e88ba9f22

Change-Id: I174a627fe877f66b81ae889a82eefadff8216dc4
2018-08-24 12:53:01 -07:00
Chih-Hung Hsieh 9e88ba9f22 Remove flto dependent flags when -flto is removed.
* C++ source files could be compiled with "-fwhole-program-vtables"
  in cppflags. We need to filter out those flto dependent flags
  in flags.CppFlags and use flags.toolingCppFlags instead of
  flags.cppFlags.

Test: build with WITH_TIDY=1
Change-Id: Ic2b0f99b95a5f0422f879226e6f6060cab71456a
2018-08-24 18:42:22 +00:00
Chih-hung Hsieh 5761ca65c6 Merge "Add clang-tidy.sh to filter out troublesome flags."
am: a644fbfa2c

Change-Id: I79f64979576431e85d6196110615450da1c4eea3
2018-08-23 15:34:55 -07:00
Chih-Hung Hsieh a7aa958e6e Add clang-tidy.sh to filter out troublesome flags.
* Some flags are accepted by clang but not clang-tidy.
  They could cause the diagnostic-unused-command-line-argument warning.
  Flag -flto messed up the -I flags.
* Add clang-diagnostic-unused-command-line-argument to
  default clang-tidy checks.
* Move CLANG_TIDY_UNKNOWN_CFLAGS to build/make/core/clang/tidy.mk.

Bug: 111850071
Bug: 111885396
Test: build with WITH_TIDY=1
Change-Id: Iabeeb27715acf83ef6aafe3e77206b9a01a0d889
2018-08-22 09:21:45 -07:00
Evgenii Stepanov 72a8984921 Merge "Add "hwaddress" sanitizer."
am: 9b4f9afbaf

Change-Id: I163b6cbcf9c14ee6fd7a55b86f5db642abe52d0a
2018-08-20 17:11:00 -07:00
Treehugger Robot 9b4f9afbaf Merge "Add "hwaddress" sanitizer." 2018-08-20 23:22:35 +00:00
Evgenii Stepanov d97a6e9483 Add "hwaddress" sanitizer.
This is a new sanitizer similar to ASan, but with a few differences
from the build system perspective:
* Only runs on AArch64.
* Supports static binaries.
* Bionic itself will be built with HWASan.
* Does not have any "if a library is sanitized than the binary must
  be, too" requirements unlike ASan. Even better, individual static
  libraries can be freely sanitized or not. We propagate "nosanitize"
  from binaries to static libraries anyway, because otherwise there
  is no good way to disable hwasan on a binary as a whole.

Same a CFI, we export a list of sanitized static libraries to make.
In fact, we export separate lists for vendor and regular libraries,
because it is possible for one to be sanitized without the other
(i.e. there can be mylib.hwasan.vendor w/o mylib.hwasan or vice
versa).

Bug: 112438058, 112709969
Test: manual, part of a bigger patch set

Change-Id: Ie4fdeb522ac03cf9684526882e84dfee3807b6a7
2018-08-16 13:18:47 -07:00
Colin Cross f83e82933e Move autogenerated test config into Soong
am: 303e21f695

Change-Id: Ia2a12f6a398b8273e4c726b95e7e84a4825c7518
2018-08-14 19:34:04 -07:00
Colin Cross 303e21f695 Move autogenerated test config into Soong
Move autogenerating the test config for Soong modules into Soong
for java_test and android_test modules.

Bug: 70770641
Test: m checkbuild
Test: atest CtsUiRenderingTestCases
Change-Id: I02593add0407ef694b91c14cf27411a4f3cc4745
2018-08-14 15:44:08 -07:00
Logan Chien 70c797395f Merge "Support prebuilt shared libs end with versions" am: 0c3b508d2b
am: 31e8907827

Change-Id: Ic37a0c2e5c4c02dd42d13cb3bc413e40cfeb67f8
2018-08-12 19:01:34 -07:00
Logan Chien 0c3b508d2b Merge "Support prebuilt shared libs end with versions" 2018-08-13 01:52:23 +00:00
Hridya Valsaraju 80f85655a0 Add exclude_header_libs for recovery_available:true libs am: 280febfb14
am: 877a4c1fbc

Change-Id: Ie1b482962df94f4746c629d7fe93a8cd535cedb9
2018-08-10 12:30:40 -07:00
Hridya Valsaraju 280febfb14 Add exclude_header_libs for recovery_available:true libs
Bug: 78793464
Test: mmm
libhardware needs to be made available in recovery without
exporting bluetooth and audio headers.

Change-Id: Ib1d1bcda49abccfb9a4768580e1c1d92ead68773
2018-08-10 09:35:47 -07:00
Jiwen 'Steve' Cai e5d9bde094 Add exclude_header_libs for vendor_available:true libs am: 8dbc653dff
am: 76180a8c7d

Change-Id: I455cbcb8e1ad894213fb4047d44d156b730d7fac
2018-08-09 23:06:04 -07:00
Jiwen 'Steve' Cai 8dbc653dff Add exclude_header_libs for vendor_available:true libs
Adding a mechanism to conditionally exclude some header library
dependencies when a lib is built for vendors.

Without this, some libraries cannot be earily marked as vendor_available
if they are depending on header libs can shouldn't be marked as
vendor_available.

By using exclude_header_libs with exclude_srcs (or __ANDROID_VNDK__
macro), we can eliminate the unnecessary dependency for vendors.

Bug: 112338314
Test: build
Change-Id: If12dceb6045099fe828fe33af2ac4428f88499a2
2018-08-09 21:19:32 -07:00
Dan Albert 0d205d4d85 Dedup version-script handling code. am: 61f32128aa
am: 3475e072b6

Change-Id: I95eb9b85c90ef5c19921f1895cbbd57763cc44c7
2018-08-09 11:51:26 -07:00
Logan Chien 031d2b32e3 Support prebuilt shared libs end with versions
This commit changes how `cc/androidmk.go` generates LOCAL_MODULE_STEM,
LOCAL_MODULE_SUFFIX, and LOCAL_BUILT_MODULE_STEM.  Now, `splitFileExt()`
takes a file name and a list of expected file extensions.
`splitFileExt()` searches the first occurrence of expected file
extensions in the file name.  If it can not find any, it will simply
return the last file extension.

Before this commit, `cc/androidmk.go` simply extracts the last file
extension (e.g. `.so`).  However, if the prebuilt shared libs end with
version numbers (e.g. `libc++.so.1`), it will use `$(LOCAL_MODULE).1` as
LOCAL_BUILT_MODULE_STEM and this will lead to missing target ninja
error.

Bug: 111579848
Test: Build a program that links libc++_host (from prebuilts/clang)
Change-Id: Id96726c69705d518ea725bb6abd8ff4527ca0cbc
2018-08-09 10:45:18 +08:00
Dan Albert 61f32128aa Dedup version-script handling code.
This is common to binaries and libraries, so move it from library.link
and binary.link to baseLinker.linkerFlags and baseLinker.linkerDeps.

Test: make checkbuild
Bug: None
Change-Id: I5fb24118e601673ae0713a6adc773a1565749be8
2018-08-08 14:36:34 -07:00
Julien Desprez eee05612fe Merge "Support 'test_config' into soong modules" am: 7a127f97b6
am: 687965c36b

Change-Id: I4cdc3ed50e813c85951372383a707d0dc3e19793
2018-08-08 10:59:39 -07:00
Julien Desprez e146e39fa6 Support 'test_config' into soong modules
Test: make general-tests
Bug: 110982517
Change-Id: Ib2eab2653fdfce6f699b85c9fbc64558b6d40363
2018-08-07 15:51:21 -07:00
Logan Chien 42cf4b8715 Merge "Remove LinuxClangCppflags" am: 7a1d4418d6
am: dc9321b257

Change-Id: I0988dcf773d249db6b636c936bc4b6b05e79f686
2018-07-31 11:00:34 -07:00
Logan Chien dc9321b257 Merge "Remove LinuxClangCppflags"
am: 7a1d4418d6

Change-Id: I5507797e2ff5e7c08b9dfd1d04d15d29c290ac69
2018-07-31 10:56:27 -07:00
Logan Chien 7a1d4418d6 Merge "Remove LinuxClangCppflags" 2018-07-31 17:51:17 +00:00
Logan Chien bef00a2c52 Remove LinuxClangCppflags
This commit removes LinuxClangCppflags.  Adding these `-isystem` flags
results in build failures when we build a module with `libc++_host`.
Furthermore, these headers are not being used anymore.

Bug: 111579848
Test: make checkbuild  # on aosp and internal
Change-Id: Ideca268431d9d60d383e3e5b7bb3f73ece416bd2
2018-07-31 01:45:00 +08:00
Chih-Hung Hsieh bafbeac702 Do not pass -flto dependent flags to clang-tidy. am: ff7cff7268
am: 9e7e09b77a

Change-Id: Ia26281d74e74cb4aa6f111e2273a012e9a266350
2018-07-26 20:23:10 -07:00
Chih-Hung Hsieh 9e7e09b77a Do not pass -flto dependent flags to clang-tidy.
am: ff7cff7268

Change-Id: I0da058960c67b69ecf2df63e5f2b385b82eea80e
2018-07-26 20:19:07 -07:00
Chih-Hung Hsieh ff7cff7268 Do not pass -flto dependent flags to clang-tidy.
Bug: 111885396
Test: run with WITH_TIDY=1
Change-Id: I92468491cdc5894d1197f6c1631e2073c6e7c4fa
2018-07-26 17:43:12 -07:00
Chih-Hung Hsieh d31b3f87dd Merge "Do not pass -flto and -fsanitize flags to clang-tidy." am: 9f65ef8cd9
am: 167d8c77ba

Change-Id: Ibe7416e9ae2b5b1f73dda5862a3c3eebda33bc60
2018-07-26 17:04:54 -07:00
Chih-Hung Hsieh 167d8c77ba Merge "Do not pass -flto and -fsanitize flags to clang-tidy."
am: 9f65ef8cd9

Change-Id: I7edbaaa8cccabe2b2952fa88499bdfbecfecf60a
2018-07-26 16:59:42 -07:00
Chih-Hung Hsieh 5942fe4fd1 Do not pass -flto and -fsanitize flags to clang-tidy.
Some flags stop clang-tidy to search included header files.

Bug: 111885396
Test: run with WITH_TIDY=1
Change-Id: Ie1ac37298793c015286db0f5caa252b67f4db365
2018-07-26 15:00:28 -07:00
Ryan Prichard 07c5952b1d Revert part of "Stop versioning NDK stubs pre-M." am: 37ebbdee6c
am: 81947d241c

Change-Id: I49be6f68894928f09557305d8ddedf5616b9c1e7
2018-07-24 17:14:57 -07:00
Ryan Prichard 81947d241c Revert part of "Stop versioning NDK stubs pre-M."
am: 37ebbdee6c

Change-Id: Icd202a99e39622e9d788763bf819a0d7be5acfad
2018-07-24 17:05:41 -07:00
Dan Albert 6bc5b8320f Stop versioning NDK stubs pre-M.
Test: make ndk # readelf various stubs to check version info
Bug: https://github.com/android-ndk/ndk/issues/622
Change-Id: Ic2930cfe5ee8377bb89bfb1bc051b6975f6e57d3
Merged-In: Ic2930cfe5ee8377bb89bfb1bc051b6975f6e57d3
(cherry picked from commit c229f38e93)
2018-07-24 22:52:57 +00:00
Ryan Prichard 37ebbdee6c Revert part of "Stop versioning NDK stubs pre-M."
This reverts commit e67144e302.

Keep the getApiLevelsMap function and keep using it in
shouldUseVersionScript. It seems useful. (Also, keeping it probably avoids
an AOSP->internal merge conflict...)

Bug: https://github.com/android-ndk/ndk/issues/750
Test: m out/soong/ndk.timestamp, examine dynsym in stubs
Change-Id: Icbb26fc46a9a1dc99f22af195468f08713c4f216
2018-07-24 12:46:35 -07:00
Dan Willemsen 6f952934cb Remove `clang: false` support am: 742a5453c2
am: 4713e25788

Change-Id: Ib39f9ad249a632ac4d8024a5c37a29f096c6ae1f
2018-07-23 19:26:00 -07:00
Dan Willemsen 4713e25788 Remove `clang: false` support
am: 742a5453c2

Change-Id: Idcb738ca7cb39882157f36ca44ef492fe2a8b0a0
2018-07-23 19:20:56 -07:00
Dan Willemsen 742a5453c2 Remove `clang: false` support
Most everything in Soong is using clang (and we're getting very close
for Make as well), so remove the ability to select GCC to build a
module.

We still need to keep the internal functionality around to find libgcc.a
and other toolchain_library modules with GCC.

Test: m blueprint_tools
Change-Id: I5ef3e3836b9ad3e160669ac32aee39698c9b72c3
2018-07-23 17:19:36 -07:00
Dan Willemsen 7c6bbd6c1f Fix `go vet` issues am: 59339a29e1
am: af42826aee

Change-Id: I6e8d7a9d3abb13b035e394f7c0657d49d64f8b5b
2018-07-22 23:28:00 -07:00
Dan Willemsen af42826aee Fix `go vet` issues
am: 59339a29e1

Change-Id: I6c5de64ee36c1dde4e043b36f84d2cf140afac41
2018-07-22 23:23:59 -07:00
Dan Willemsen 59339a29e1 Fix `go vet` issues
Test: go vet ./...
Change-Id: Ifb936ccc5e2b5a2c3fcbbbcb54f680e2973ea1b3
2018-07-22 21:18:45 -07:00
Logan Chien 68fa0cfc5a Merge changes I420a5953,I8e2352f3,I7a6bb905 am: 23be383843
am: 8847412281

Change-Id: I8438e42982d62a68f4dea625e2b9c3f0bd444545
2018-07-18 21:26:21 -07:00
Logan Chien 8847412281 Merge changes I420a5953,I8e2352f3,I7a6bb905
am: 23be383843

Change-Id: Ie35e110f38405cb018a887274c6099456844c454
2018-07-18 21:22:24 -07:00
Treehugger Robot 23be383843 Merge changes I420a5953,I8e2352f3,I7a6bb905
* changes:
  Support text ABI dump file format
  Remove vndkVsNdk()
  Remove isSourceDump from PathForVndkRefAbiDump()
2018-07-19 04:15:30 +00:00
Treehugger Robot cdf399c40a Merge "Stop versioning NDK stubs pre-M." 2018-07-18 01:13:49 +00:00
Dan Albert e67144e302 Stop versioning NDK stubs pre-M.
Test: make ndk # readelf various stubs to check version info
Bug: https://github.com/android-ndk/ndk/issues/622
Merged-In: Ic2930cfe5ee8377bb89bfb1bc051b6975f6e57d3
Change-Id: Ic2930cfe5ee8377bb89bfb1bc051b6975f6e57d3
2018-07-17 23:26:00 +00:00
Dan Albert c229f38e93 Stop versioning NDK stubs pre-M.
Test: make ndk # readelf various stubs to check version info
Bug: https://github.com/android-ndk/ndk/issues/622
Change-Id: Ic2930cfe5ee8377bb89bfb1bc051b6975f6e57d3
2018-07-13 13:25:33 -07:00
Jiyong Park 84e78c4973 Merge "Don't create non-primary arch variant for recovery-only module" am: 9ea9fc3dee
am: 7f413148ed

Change-Id: I7aa7634ee2ece3c39b1dcaebccfedf7d785857f1
2018-07-12 18:44:11 -07:00
Jiyong Park 7f413148ed Merge "Don't create non-primary arch variant for recovery-only module"
am: 9ea9fc3dee

Change-Id: Ibe1274c36c9233ee396d323544c6aa599f635ae5
2018-07-12 17:14:44 -07:00
Jiyong Park 37b252096a Don't create non-primary arch variant for recovery-only module
To save space, only the primary arch variant is installed to the
recovery partition. This has been done in the imageMutator by not
creating recovery variant for the non-primary arch.

However, this caused a problem for recover-only module, i.e., recovery:
true. Such module ends up creating no variant for the non-primary arch.
Since every other modules are at least in one image variant, any
dependency fro such module with no image variant can't be satisfied.

In order to solve the problem, archMutator is modified to create only
the primary arch for recovery-only modules.

Bug: 111321972
Test: m -j (TestRecovery added)
Change-Id: Ie32ae06fb094efcfd8531cdf6071139d292d93ab
2018-07-12 10:49:30 +09:00
Logan Chien 7eefdc4ed2 Support text ABI dump file format
This commit adds an option to read ABI reference dump in text file
format directly from `prebuilts/abi-dumps`.  If both the text file and
the gzip format exist, an error will be emitted.

Bug: 78650426
Test: create libexif.lsdump.gz and it works as usual
Test: create libexif.lsdump (decompressed) and it works
Test: touch both libexif.lsdump.gz and libexif.lsdump and it errors
Change-Id: I420a5953fb80855cb5c07e5a4d347fb6709f0340
2018-07-11 18:37:50 +08:00
Logan Chien 5237bed1c4 Remove vndkVsNdk()
This commmit removes `vndkVsNdk()`, which is essentially
`!inList(ctx.baseModuleName(), llndkLibraries)`.

Test: lunch aosp_arm64_ab-userdebug && make
Change-Id: I8e2352f302df30057997944678f176f4550d3f75
2018-07-11 17:30:39 +08:00
Logan Chien 83c415f955 Remove isSourceDump from PathForVndkRefAbiDump()
This commit removes `isSourceDump` from `PathForVndkRefAbiDump()`
because the binary dump paths are not being used at all.

Test: lunch aosp_arm64_ab-userdebug && make
Change-Id: I7a6bb9053a6b052590fb1152982949fee897df8d
2018-07-11 15:27:36 +08:00
Logan Chien 2fbf1cba9d Merge "Cleanup createVndkSourceAbiDump()" am: f33dca0ada
am: 322ab10d5a

Change-Id: I0e1abe56f73cb0285e14b26ac13217978ff36aeb
2018-07-10 20:23:14 -07:00
Logan Chien 322ab10d5a Merge "Cleanup createVndkSourceAbiDump()"
am: f33dca0ada

Change-Id: I4be5bfa5f3c9affc946942f9dd6915c1f36e0e65
2018-07-10 20:18:54 -07:00
Logan Chien 2f2b890a18 Cleanup createVndkSourceAbiDump()
This commit cleans up `createVndkSourceAbiDump()` and renames it to
`shouldcreateVndkSourceAbiDump()`.

Test: lunch aosp_walleye-userdebug && make
Change-Id: Iff4379e2812c4b5c5baff288b938eed5d92e024f
2018-07-10 15:03:44 +08:00
Jiyong Park 236c6202b5 Merge "Fix: recovery module is disabled on 32-bit targets" am: bdf16ec5b2
am: 0d08b06820

Change-Id: I82f5dad19bdb10083c13441a6ca525ff97478bb1
2018-07-09 18:54:40 -07:00
Jiyong Park 0d08b06820 Merge "Fix: recovery module is disabled on 32-bit targets"
am: bdf16ec5b2

Change-Id: Ice8e0442c79ec3d673f33e8f8a229c1eccaa8b78
2018-07-09 18:45:11 -07:00
Jiyong Park 8d52f86baf Fix: recovery module is disabled on 32-bit targets
Fixed a bug that recovery variant of a module is not created on 32-bit
targets. The bug was happening because the creation of the recovery
variant relied on DevicePrefer32BitExecutables() which returns false
for 32-bit only targets.

Now, recovery variant is checked against the primary architecture of the
device that is returned by DevicePrimaryArchType().

Test: m -j adbd.recovery on aosp_arm and aosp_arm64
adbd is built under recovery/root/system/bin and it is ELF32 and ELF64,
respectively for the targets.
Test: m -j libc.recovery on aosp_arm, aosp_arm64, aosp_sailfish
and the x86+arm target in mater. Only one libc.so is installed
under recovery/root/system/lib (or lib64).

Change-Id: I83a248d81f2c71dcfb0e9d887a75b71338f27b4d
2018-07-08 09:43:10 +09:00
Steven Moreland 77debe2167 Merge "aidl: -ninja -> --ninja" am: 17bef8f034
am: b3fec2c4c2

Change-Id: Ib47a96dc4e91caafccff9ce31a2b29404c4cc3ea
2018-07-06 17:29:18 -07:00
Steven Moreland b3fec2c4c2 Merge "aidl: -ninja -> --ninja"
am: 17bef8f034

Change-Id: I9745a188c77ede18c1a106239cba35abd25fea2c
2018-07-06 17:24:57 -07:00
Steven Moreland b468bca551 aidl: -ninja -> --ninja
Bug: 110967839
Test: AIDL's runtests.sh
Change-Id: I49c0a2526b6d4083c927104a3e66017080000847
2018-07-06 11:36:32 -07:00
Yi Kong c888227e7d Merge "Revert^6 "Move -Wno-enum-compare{,-switch} to external cflags""
am: c415116333

Change-Id: I352ec6a79d3d525c17bde9eceaf3b348b63d6a9a
2018-06-29 17:18:21 -07:00
Pirama Arumuga Nainar 8db11184e6 Merge "Remove unsupported/unused No_pie property"
am: b830e84821

Change-Id: Ief33f0e4bcf5c9323e012e4cefbc8e957eba6a34
2018-06-29 17:06:16 -07:00
Yi Kong c415116333 Merge "Revert^6 "Move -Wno-enum-compare{,-switch} to external cflags"" 2018-06-30 00:03:55 +00:00
Pirama Arumuga Nainar 19fae4e803 Remove unsupported/unused No_pie property
Bug: http://b/111000882

Doesn't seem to be supported.

Test: AOSP build, TreeHugger
Change-Id: Idaab52caa876102b062b3c21acd42c37328bd328
2018-06-29 14:57:46 -07:00
Yi Kong e1e83e4279 Revert^6 "Move -Wno-enum-compare{,-switch} to external cflags"
This reverts commit c729b508c3.

Reason for revert: New breakages fixed

Change-Id: I8b5e597fdb2af782d591ddcf5b4e7534273a2e7b
Merged-In: I8b5e597fdb2af782d591ddcf5b4e7534273a2e7b
2018-06-29 20:35:35 +00:00
Roland Levillain cda6b350c6 Merge "Revert^5 "Move -Wno-enum-compare{,-switch} to external cflags""
am: cf96428ef4

Change-Id: I5521b4b7e10da012897018333e1209e00742f3f3
2018-06-29 02:45:53 -07:00
Roland Levillain cf96428ef4 Merge "Revert^5 "Move -Wno-enum-compare{,-switch} to external cflags"" 2018-06-29 09:37:42 +00:00
Yi Kong c729b508c3 Revert^5 "Move -Wno-enum-compare{,-switch} to external cflags"
This reverts commit e0050ebda1.

Reason for revert: Breaks build

Change-Id: I01bc218553ae6efb6140b66f035ccb129d3e5028
2018-06-29 08:19:46 +00:00
Yi Kong 71fd304741 Merge "Revert^4 "Move -Wno-enum-compare{,-switch} to external cflags""
am: e758c83bb5

Change-Id: I16b295a98f503685db2bd4ec1a91b52d93f65ab7
2018-06-29 00:03:50 -07:00
Yi Kong e758c83bb5 Merge "Revert^4 "Move -Wno-enum-compare{,-switch} to external cflags"" 2018-06-29 06:57:27 +00:00
Yi Kong e0050ebda1 Revert^4 "Move -Wno-enum-compare{,-switch} to external cflags"
This reverts commit 8ad44855e6.

Reason for revert: Breakage fixed, try again

Change-Id: Ia648b9513d2224a5e363b65f44f9b2f838db1d3d
2018-06-28 21:05:34 +00:00
Pirama Arumuga Nainar e4f89be932 Do not set entry-point for Windows
am: 204165320e

Change-Id: I7db0a7134cc7a6ae85b624d58e72794e0dd53bca
2018-06-27 13:26:41 -07:00
Pirama Arumuga Nainar 204165320e Do not set entry-point for Windows
Bug: http://b/62424007

This breaks 64-bit Windows executables.  Probably due to the Clang
migration, the entry-point need not be set even for 32-bit executables.

Test: 32-bit and 64-bit aapt2_tests.exe and ziparchive-tests.exe can
start.  (There are some failed tests, though).

Change-Id: Id3a7d3d2802f6b671332afff4558840bdabddeb5
2018-06-27 11:27:06 -07:00
Pirama Arumuga Nainar b6682c47b8 Merge "Do not enable sanitizers on Windows"
am: d7e5c05eac

Change-Id: I7398e6b08154c5bc7fad0507bd9e1dae8c14da0a
2018-06-26 17:05:30 -07:00
Pirama Arumuga Nainar 83d716c413 Do not enable sanitizers on Windows
Bug: http://b/69933068

Test: m native-host-cross SANITIZE_HOST=address
Change-Id: Ia9ff941fb569b0a2e9c4eef604fd165f94bca31a
2018-06-26 14:18:16 -07:00
Pirama Arumuga Nainar cd53ba1bab Merge changes from topic "mingw-clang"
am: 9d951a10f3

Change-Id: Ie7e0794c98d4b0d317cea9f1d2bf2c02e760b1e5
2018-06-26 12:54:17 -07:00
Pirama Arumuga Nainar 9af0f2d42a Use -static-libgcc for Windows
am: abf1b31a20

Change-Id: Id8eea1c93a97061fa6e50df7c9ba06a9ec62d306
2018-06-26 12:54:01 -07:00
Treehugger Robot 9d951a10f3 Merge changes from topic "mingw-clang"
* changes:
  Use clang for windows host modules
  Use -static-libgcc for Windows
2018-06-26 19:47:53 +00:00
Chih-hung Hsieh 52bd011b72 Merge "Define CLANG_TIDY_UNKNOWN_CFLAGS for build/make."
am: 95894d8ffe

Change-Id: Iac0463e8b7b8603e5d10f84e26aac7cccafc37ec
2018-06-26 10:03:25 -07:00
Pirama Arumuga Nainar 8a852e7694 Use clang for windows host modules
Bug: http://b/69933068

- Remove GCC's intrinsic header path so Clang's headers get included.
- Add '-B' with GCC's binary directory so Clang detects the linker.
- Bug: http://b/109759970 - Pass '--allow-multiple-definition' linker
flag to deal with ld.bfd's inability to handle Clang-generated section
names is fixed.
- Bug: http://b/110800681 - lld cannot link Android's Windows modules
yet

Test: m native-host-cross and run adb_test.exe under wine.

Change-Id: I9be9cfc34a47cbeee04024438dea214305112eaa
2018-06-25 18:36:50 -07:00
Pirama Arumuga Nainar abf1b31a20 Use -static-libgcc for Windows
Bug: http://b/69970955

With the MinGW prebuilts update (http://aosp/709402), executables get a
runtime dependency on libgcc_s_sjlj-1.dll with both gcc and Clang.
Passing -static-libgcc removes this dependency and is a better option
than having to package an extra dll with executables.

Test: Run gcc-built adb_test.exe under wine
Change-Id: I18e5fadb1b8ace510ae684e2d4cfa7fe7d007cff
2018-06-25 18:31:01 -07:00
Chih-Hung Hsieh ad47a27d9c Define CLANG_TIDY_UNKNOWN_CFLAGS for build/make.
Bug: 110538415
Test: build with WITH_TIDY=1
Change-Id: I6c5b5a0cb3ad3c2756bbae5e7c0234a0dafe5991
2018-06-25 13:48:42 -07:00
Colin Cross e98238b3ab Merge "Use WalkDeps instead of VisitDepsDepthFirst"
am: cbafd0fb48

Change-Id: Ic22ffa9ac8a5e3b5c29cd5e85664acb1afebc04f
2018-06-22 17:14:31 -07:00
Colin Cross 6b75360cbc Use WalkDeps instead of VisitDepsDepthFirst
VisitDepsDepthFirst is almost never correct, as it can't query
dependency tags of multiple dependencies between the same two modules.
Replace VisitDepsDepthFirst with WalkDeps in sanitize.go and
python.go.  Also verify the dependency tag before continuing to
recurse to ensure that they don't recurse through genrules and into
unrelated modules.

Test: m checkbuild
Change-Id: I2f7560126f56b51a40ec39dfbdcc18b5891489f7
2018-06-22 12:44:35 -07:00
Jiyong Park 48bdb37b4a Merge "Recovery partition uses the first architecture only"
am: 87e50a0d14

Change-Id: I2da330f2a4062039f83ecb90800e65595982ad32
2018-06-19 18:20:35 -07:00
Treehugger Robot 87e50a0d14 Merge "Recovery partition uses the first architecture only" 2018-06-20 01:11:10 +00:00
Kostya Kortchinsky 9cba8204b1 Soong support for Scudo
am: d18ae5ce98

Change-Id: I0c0fcf29ccd99575de573a915c7da5d51b14cd45
2018-06-19 13:11:58 -07:00
Kostya Kortchinsky d18ae5ce98 Soong support for Scudo
Scudo is a hardened usermode allocator that is part of LLVM's compiler-rt
project (home of the Sanitizers). clang allows for -fsanitize=scudo as a
possible command line option to link the shared Scudo library to a binary.

This patch add Scudo as a potential sanitize option. Scudo is not compatible
with ASan and TSan and will be disabled if either is enabled.

Bug: 72112048
Test: aosp compiled with m -j
Test: local experiment with scudo: true to ensure that a test target
(tombstoned) could be linked with scudo.

Change-Id: I76bb6c60891d4782f6665a112c4c2bf7c31645da
2018-06-19 09:46:09 -07:00
Jiyong Park 413cc744b8 Recovery partition uses the first architecture only
To save space in the recovery partition, modules installed to the
partition are restricted to be built in the first architecure (i.e.,
32bit for 32bit-only device or when TARGET_PREFER_32_BIT is true, and
64bit otherwise).

Most notably, this change removes the 32-bit variant of the linker
(about 1MB). The linker was installed regardless of whether there is a
32-bit executable or not. Now, the unnecessary linker is not installed
and it is guaranteed that all modules in the partition are built with the
same architecture.

Bug: 79146551
Test: m -j
Test: out/target/product/<name>/recovery/root/system/bin/ has only one
variant of the linker.

Change-Id: I4070a43555bad4cfa8eff5253b09dcd004ea8251
2018-06-19 10:49:21 +09:00
Yi Kong 904ba56bb9 Merge "Remove workaround for cortex-a55/a75"
am: bbabc7b67e

Change-Id: Ic8cbeab81b1c75902c95bd5e2b4e9185a2f8feb6
2018-06-17 02:08:19 -07:00
Yi Kong 9c63363119 Remove workaround for cortex-a55/a75
Test: m checkbuild
Test: boot on a55/a75 device, pass bionic tests
Bug: 110235326
Change-Id: I5ab2102352a6efe1173b3097875e6e779d4a1a09
2018-06-15 23:15:54 +00:00
Yi Kong 86b2b31736 Merge "Update ToolingCFlags overrides to include other new architectures"
am: 8eb8704cf1

Change-Id: I8b2763f16c1a2da5ec91edf3f668264ee3ea7cf2
2018-06-14 22:19:04 -07:00
Yi Kong 8eb8704cf1 Merge "Update ToolingCFlags overrides to include other new architectures" 2018-06-15 05:08:53 +00:00
Yi Kong 72f9a0b2f5 Update ToolingCFlags overrides to include other new architectures
Bug: 110235326
Test: m checkbuild
Change-Id: I9d0ada05d95bb260500c1d694332a73363b0f299
2018-06-14 18:45:54 -07:00
Jiyong Park 1598abf6df Merge changes from topic "sharedlib_in_recovery"
am: 33ab6f6134

Change-Id: I0cfce2564ba7e785bbb4db43626155cce3302ecc
2018-06-13 16:41:09 -07:00
Jiyong Park eb946e1231 Recovery partition has same layout as system
am: 2e6743176a

Change-Id: Ib59834db180f6ec06cb005291bdf527d9cc50c8b
2018-06-13 16:40:53 -07:00
Treehugger Robot 33ab6f6134 Merge changes from topic "sharedlib_in_recovery"
* changes:
  Recovery variants are built with -D__ANDROID_RECOVERY__
  Recovery partition has same layout as system
2018-06-13 23:14:29 +00:00
Jayant Chowdhary 695da73801 Merge "Fix VNDK-Ext ABI check regression"
am: 4038a6ea9f

Change-Id: I51230cf8c0f72b3492eea1fa042228c77dd1f99f
2018-06-13 11:05:08 -07:00
Logan Chien ef1ff3de98 Fix VNDK-Ext ABI check regression
VNDK-Ext are modules with `vndk.enabled: true` but not having
`vendor_available: true`.  In addition, VNDK-Ext should be checked by
source ABI checker.  This change fixes the regression introduced in

Bug: 110142940
Test: Create libminijail_ext, break some ABIs, and see an error.
Change-Id: I8b47ac12d2e132f641129c9549ed22c3971d6c89
2018-06-13 22:32:16 +08:00
Martijn Coenen 2de6cdcecb Merge "Revert "Revert "Revert "Move -Wno-enum-compare{,-switch} to external cflags""""
am: 4de27d7e4f

Change-Id: Ia8ffa6818e19128e1a4c058a64c8b503435136d3
2018-06-13 00:51:05 -07:00
Martijn Coenen 4de27d7e4f Merge "Revert "Revert "Revert "Move -Wno-enum-compare{,-switch} to external cflags"""" 2018-06-13 07:37:56 +00:00
Martijn Coenen 8ad44855e6 Revert "Revert "Revert "Move -Wno-enum-compare{,-switch} to external cflags"""
This reverts commit cc4bbdccd3.

Reason for revert: breaks builds

Change-Id: Ia8908eb372ce46b23aea73283baf37add4477312
2018-06-13 07:36:05 +00:00
Yi Kong 0ca4f2e1d2 Merge "Revert "Revert "Move -Wno-enum-compare{,-switch} to external cflags"""
am: 6da4f7d747

Change-Id: Ia388e92f279eac5a07dafbd241d879c280e0d156
2018-06-12 19:19:10 -07:00
Yi Kong 6da4f7d747 Merge "Revert "Revert "Move -Wno-enum-compare{,-switch} to external cflags""" 2018-06-13 02:10:12 +00:00
Yi Kong cc4bbdccd3 Revert "Revert "Move -Wno-enum-compare{,-switch} to external cflags""
This reverts commit 2f71a6adcd.

Change-Id: I09abb194b25813b8b1e4470b22171121cc3f8c11
2018-06-12 22:59:16 +00:00
Yi Kong 40a43808a4 Merge "Revert "Move -Wno-enum-compare{,-switch} to external cflags""
am: 04f0140479

Change-Id: Iff0ddb70ac23f8d4b6b97ce9a6c0f9ba11876a4c
2018-06-12 01:28:13 -07:00
Treehugger Robot 04f0140479 Merge "Revert "Move -Wno-enum-compare{,-switch} to external cflags"" 2018-06-12 06:44:00 +00:00
Yi Kong 2f71a6adcd Revert "Move -Wno-enum-compare{,-switch} to external cflags"
This reverts commit 96d221f914.

Reason for revert: build breakage for sdk target

Change-Id: I933df62738c08b48d8ae4ea951b2cb4837616c78
2018-06-12 04:51:49 +00:00
Yi Kong d60cb4a7cc Merge "Move -Wno-enum-compare{,-switch} to external cflags"
am: 276e82ef2a

Change-Id: If341e9b12017430d0b54a6f35db9f57598217ee4
2018-06-11 20:51:20 -07:00
Colin Cross cb9b2bda11 Merge "Only write CMakeLists.txt for normal variants"
am: d27a18ff2f

Change-Id: I1fc886940823868fc0bc7b130eedac168c5f0871
2018-06-11 20:50:59 -07:00
Chih-Hung Hsieh c970278167 Merge "Add lld --no-rosegment flag to work with unwinder."
am: 01c66c199e

Change-Id: If38e1b593b1332982ac57e8d00c6d638c7126126
2018-06-11 20:50:44 -07:00
Yi Kong 276e82ef2a Merge "Move -Wno-enum-compare{,-switch} to external cflags" 2018-06-12 02:58:15 +00:00
Treehugger Robot d27a18ff2f Merge "Only write CMakeLists.txt for normal variants" 2018-06-12 01:36:13 +00:00
Treehugger Robot 01c66c199e Merge "Add lld --no-rosegment flag to work with unwinder." 2018-06-12 00:13:27 +00:00
Chih-Hung Hsieh b18814e7a4 Add lld --no-rosegment flag to work with unwinder.
Bug: 109657296
Test: make checkbuild and boot
Change-Id: If8eda7ced31f5d4abb357935e9292b81936af6be
2018-06-11 15:07:34 -07:00
Yi Kong 96d221f914 Move -Wno-enum-compare{,-switch} to external cflags
Test: m checkbuild
Bug: 72330874
Change-Id: I8aaa020f5efafa8746b2c5ae29cea1a313a28045
2018-06-11 14:54:35 -07:00
Jayant Chowdhary 280ee69f47 Merge "For llndk libraries add -consider-opaque-types-different to header-abi-diff invocation."
am: 694b1c7c94

Change-Id: Id7f9b5efa5d157c3fb9c00c140a02d7937a289a9
2018-06-11 14:18:27 -07:00
Jayant Chowdhary 694b1c7c94 Merge "For llndk libraries add -consider-opaque-types-different to header-abi-diff invocation." 2018-06-11 20:16:21 +00:00
Jayant Chowdhary c7434e28d3 For llndk libraries add -consider-opaque-types-different to header-abi-diff invocation.
Bug: 79576032

Test: Create abi reference for libmediandk; build libmediandk;
      header-abi-diff gets invoked with '-consider-opaque-types-different'

Change-Id: I132138e333cc944b54051243b44fa072af74aa83
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2018-06-11 10:51:43 -07:00
Justin Yun 89aa92c6aa Merge "Add binder32bit to vndk_prebuilt module"
am: 30f9382654

Change-Id: I35ca3f845a7bb677af7aeba09915e9765d898d94
2018-06-10 18:55:05 -07:00
Jiyong Park d54aee574d Recovery variants are built with -D__ANDROID_RECOVERY__
Recovery variant of a module is now by default built with
-D__ANDROID_RECOVERY__, thus eliminating the need to define a custom
macro to conditionally compile the module for the recovery mode.
(Of course, they can define their own macro if needed)

Bug: 63673171
Test: m -j
Change-Id: I1d1b990329793472b93c2f56080e72d690eef9ec
2018-06-09 02:03:45 +09:00
Jiyong Park 2e6743176a Recovery partition has same layout as system
Recovery partition has same layout as system. In other words,
executables are installed to <recovery_root>/system/bin and libs are
installed to ../system/lib.

This is made possible because the recovery partition is now
self-contained, i.e., shell, adbd, etc. are hosted in the recovery
partition and thus we no longer has to mount the real system.img
to /system. So /system is now available to executables built for
recovery mode.

Bug: 63673171
Test: `adb reboot recovery; adb devices` shows the device ID
Test: Select 'mount /system' in the recovery mode, then `adb shell`.
$ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from
the /lib directory.

Change-Id: I6c4f903ad21fd3dd10a07c4588be85d3d678c099
2018-06-09 01:57:00 +09:00
Justin Yun 3e2323d202 Add binder32bit to vndk_prebuilt module
For a vndk_prebuilt module that was built with 32 bit binder, add
"binder32bit: true" to its Android.bp module.
This will add .binder32 suffix to the name.

Bug: 74362637
Bug: 80450527
Test: m -j vndk_snapshot_package
Change-Id: I81049adbf5e67fe5e63d5ea3a8b027aaf6eb355b
2018-06-08 15:56:40 +09:00
Chih-Hung Hsieh 410f48ca0e Use llvm-{objcopy,strip} when clang lld is used. am: 30485c920c
am: c6f8e4f025

Change-Id: Ia05a21c77f0aade23201f95140563de12417bab7
2018-06-07 21:07:55 -07:00
Chih-Hung Hsieh 30485c920c Use llvm-{objcopy,strip} when clang lld is used.
* Pass LLVM_{OBJCOPY,STRIP} to makefile rules.
* strip.sh is used only in soong-only mode.
  It will use llvm-strip and  and llvm-objcopy
  when --use-llvm-strip is given.
  Keep flags of strip.sh in alphabetic order.
* Tested build/soong/scripts/build-ndk-prebuilts.sh
  by adding "UseClangLld": true, to soong.variables file.

Bug: 80093681
Test: build/soong/scripts/build-ndk-prebuilts.sh
Change-Id: I612267304eea434c7a33cc086b27b577d5f64094
2018-06-07 16:04:14 -07:00
Colin Cross dfe4752181 Only write CMakeLists.txt for normal variants
Modules may have multiple variants for each architecture, and
SOONG_GEN_CMAKEFILES=1 was generating CMakeLists.txt for all of
them, overwriting the first normal variant with the last (and
likely least normal) variant.

Keep a map of generated CMakeLists.txt files, and only generate
each one once.

Bug: 72283227
Test: m SOONG_GEN_CMAKEFILES=1
Change-Id: If31087264d2809088fe36965b9a0ff0f44089852
2018-06-07 21:34:03 +00:00
Yi Kong b9e2a10093 Merge "Revert "Revert "Add external projects only CFlags option""" am: 8d29e1e024
am: 2090540f19

Change-Id: I8d1872552155864a7fa175c9fc1b25031ed8bc76
2018-06-06 23:57:25 -07:00
Yi Kong cc80f8d64f Revert "Revert "Add external projects only CFlags option""
This reverts commit a9ccbb7b87.

Test: m
Change-Id: I92d7b7707f73ef3af5824d3e8cb6da0465b5e07d
2018-06-06 16:41:26 -07:00
Colin Cross 3a11cd03b8 Remove references to SourceDepTag in module types am: 2d24c1b654
am: 069ebe6692

Change-Id: I0b7f249b3224ca8099f10eac53ee782f552ce951
2018-06-06 15:23:07 -07:00
Colin Cross 2d24c1b654 Remove references to SourceDepTag in module types
SourceDepTag is going to become a set of tags of the same type
instead of a single tag, remove references to it outside the
android module.

Bug: 80144045
Test: soong tests
Change-Id: I00b2ea5040e4fc95dfbfdd79e21579853c478fcb
2018-06-06 17:05:20 +00:00
Kevin Rocard 0a5fee786f Revert "Add external projects only CFlags option"
This reverts commit 6a350878d8.

Reason for revert: Breakage of many AOSP targets

Change-Id: I917e6daa04ac02ecb98c7bb1816f9bdaf46429f5
2018-06-05 16:47:31 -07:00
Kevin Rocard a9ccbb7b87 Revert "Add external projects only CFlags option"
This reverts commit 6a350878d8.

Reason for revert: Breakage of many AOSP targets

Change-Id: I917e6daa04ac02ecb98c7bb1816f9bdaf46429f5
2018-06-05 21:43:46 +00:00
Yi Kong 328ec9e7ee Add external projects only CFlags option am: 6a350878d8
am: 92e4e46184

Change-Id: I39dc3ace804e9a1242d1f63b3138cbdcc8c5da91
2018-06-05 14:19:25 -07:00
Yi Kong 6a350878d8 Add external projects only CFlags option
Every time the toolchain adds a new warning, we had to suppress the
warning in every external projects that violates it, or disable it
globally -- which we end up doing most of the time since the first
option is way too time consuming.

Add a separate cflags option for external projects and move existing
-Wno-* flags there so that we can enforce better code quality for
internal projects.

TODO: Move more -Wno-* flags to ClangExtraExternalCflags

Test: m checkbuild
Change-Id: If3dee491616a1e7ba6223c2f522d100e10c5ee76
2018-06-05 19:32:02 +00:00
Dan Willemsen 5fcdd551e3 Merge "Fix mac sdk build" am: 85b1e39ffe
am: 793791e6bc

Change-Id: I544c61212f950e511edf5f1d59f63931a759abf5
2018-06-04 18:36:47 -07:00
Treehugger Robot 85b1e39ffe Merge "Fix mac sdk build" 2018-06-05 00:47:16 +00:00
Dan Albert f984e93162 Merge "Add a preprocessed_ndk_headers module type." am: 1efd4a9c81
am: 25cb14eb52

Change-Id: I9be1a4504816f33de3ca3ff5affafaa951939066
2018-06-04 17:38:46 -07:00
Treehugger Robot 1efd4a9c81 Merge "Add a preprocessed_ndk_headers module type." 2018-06-04 23:40:03 +00:00
Dan Willemsen 60533776be Merge "Allow more PATH tools, expose HOST_STRIP" am: 1d2318d6cd
am: fe3f651a8c

Change-Id: Ia46f06522640875096ccf444cb2c1a678450a100
2018-06-04 10:02:20 -07:00
Dan Willemsen fdb20d05bc Fix mac sdk build
Use the host platform "strip", and also expose "nm" and "otool" used for
toc.

Test: `m PRODUCT-sdk-sdk` on Mac
Change-Id: I7a6d127f479d3e563385ead46bc3a4b49b99776b
2018-06-03 16:19:56 -07:00
Treehugger Robot 1d2318d6cd Merge "Allow more PATH tools, expose HOST_STRIP" 2018-06-01 23:58:15 +00:00
Chih-hung Hsieh 21ef2a54f9 Merge "Handle pack_relocations in linker.cc" am: a4181126ee
am: 7bc0f8dbd6

Change-Id: I7cf2e5bcce66f09f13260bad63a1fb3769b4b89a
2018-06-01 14:07:16 -07:00
Chih-hung Hsieh a4181126ee Merge "Handle pack_relocations in linker.cc" 2018-06-01 20:43:11 +00:00
Dan Willemsen f6d300662e Allow more PATH tools, expose HOST_STRIP
atree was using the host's strip tool during sdk generation, so expose
the prebuilt for use instead.

`id` was used with a test running minijail0 during the build

`sha1sum` is used by development/build/tools/mk_sdk_repo_xml.sh

`rmdir` was being used to remove some tmp files

Test: m PRODUCT-sdk_arm64-sdk dist sdk_repo
Test: Run other builds through forrest
Change-Id: I49c756a3e9497c0bbd9030754e6aa193a2d989a4
2018-06-01 12:48:41 -07:00
Dan Albert cb1b4b2d53 Add a preprocessed_ndk_headers module type.
Unlike the old version of this (which has been renamed to
verioned_ndk_headers), this module includes a property to specify the
preprocessor to be used.

This is going to be used for preprocessing ICU4C's unicode/uconfig.h
to alter a config value that needs to differ between the platform and
the NDK.

Test: make checkbuild
Bug: https://github.com/android-ndk/ndk/issues/548
Change-Id: If5c6f54f90cf5a4187693a941748d72f39b0d797
2018-06-01 11:02:38 -07:00
Vishwath Mohan 722b64e0ad Don't enable diagnostics for CFI when setting the CFI sanitizer. am: 05b002dea0
am: dc55e621bb

Change-Id: I04214a9fcb50363bd5d82362b366e5bf69355183
2018-05-31 11:03:56 -07:00
Vishwath Mohan 05b002dea0 Don't enable diagnostics for CFI when setting the CFI sanitizer.
The SetSanitizer() method in cc/sanitize.go was also enabling
diagnostics for CFI when invoked from the sanitizer mutator. We
shouldn't be doing this, so this CL disables that.

Bug: 79785496
Test: strings libziparchive.so | grep 'ubsan'
Change-Id: Iffe0d4e9c333ac5dfbec3f48e381c232ce5d4463
2018-05-30 20:52:39 -07:00
Jiyong Park 311086ab68 Merge "LOCAL_SDK_VERSION is not emitted for recovery variant" am: f3c251c5de
am: 28f6db54f4

Change-Id: I075e5c50ccad4059a309db554a117831a8f7e9ff
2018-05-29 21:20:50 -07:00
Jiyong Park 97686288dd LOCAL_SDK_VERSION is not emitted for recovery variant
recovery variants are not built with NDK (useSdk() is false for
recovery). So LOCAL_SDK_VERSION shouldn't be emitted for the recovery
variants as well.

Test: m -j liblzma.recovery does not show any link type check error

Change-Id: Icb6c4fc766060e3f1555c405d5785ef5a015c629
2018-05-30 10:37:25 +09:00
Vishwath Mohan 4cac067ca1 Disable CFI for vendor variants of all components
am: 9ccbba0200

Change-Id: I6a6a839475f58f92180bfd391035dd538df71a50
2018-05-29 16:36:13 -07:00
Chih-Hung Hsieh 8681471e70 Handle pack_relocations in linker.cc
When pack_relocations is false and clang lld is used,
pass --pack-dyn-relocs=none to lld.

Bug: 80093890
Test: build and boot with USE_CLANG_LLD=true
Change-Id: I0ffe77a111d7fbab5afaa1395d09734a8a390e09
2018-05-29 15:39:47 -07:00
Vishwath Mohan 9ccbba0200 Disable CFI for vendor variants of all components
The current VNDK ABI snapshot expects that CFI is disabled for
components that either in the include paths (from cfi-common.mk) OR
enabled directly in the makefile/blueprint. However, on non-arm64
architectures, the build system was only disabling CFI for vendor
components in the include paths.

This topic corrects it by (a) removing the include paths check to
disable CFI for vendor variants (this CL), and (b) inheriting the CFI
include paths in all product configs to ensure that when we update the
ABI we're able to move to relying exclusively
on (PRODUCT_)CFI_INCLUDE_PATHS.

Bug: 66301104
Test: ABI matches for all architectures.
Change-Id: I648edf13346b18fd88b623682e8590ed44709e0d
2018-05-28 13:57:48 -07:00
Dan Willemsen 34ec95cea8 Merge "Use new flex binary" am: 523cef04cb
am: da6bd163e2

Change-Id: Idd8eff00ced0e082e8d8f25469e25271630a614a
2018-05-25 16:02:12 -07:00
Treehugger Robot 523cef04cb Merge "Use new flex binary" 2018-05-25 22:44:35 +00:00
Vishwath Mohan 40aaea2321 Restrict CFI_INCLUDE_PATHS to Arm64
am: 1c54f66bd5

Change-Id: I379932454f8f18d7029f3fa3eb1654f4f36997c1
2018-05-25 00:24:53 -07:00
Jiyong Park 777a29f71a Merge changes from topic "recovery_available" am: c8036c17ab
am: 3936b21565

Change-Id: I9e50134baf4f7a3bf59c34e488d61bddd17e4dac
2018-05-24 23:15:49 -07:00
Jiyong Park eebab40b19 Mark as recovery_available:true am: 6caa21aa82
am: e9ff1887fa

Change-Id: I96c6d3843197299f75062780c04a2a8b87d78c1b
2018-05-24 23:15:42 -07:00
Jiyong Park 7fbe82540d Add recovery_available to cc_genrule am: 3f736c9661
am: f1e8411c2a

Change-Id: I7ff0a6a08293024161e307171776d988eea10ec7
2018-05-24 23:15:37 -07:00
Jiyong Park e9ff1887fa Mark as recovery_available:true
am: 6caa21aa82

Change-Id: I1e1246b5c921c3cdea1ff8a6ea9dc7659e1fce82
2018-05-24 23:07:16 -07:00
Jiyong Park f1e8411c2a Add recovery_available to cc_genrule
am: 3f736c9661

Change-Id: I88d3a144e56ef090ffce41e28339a24bb665f89a
2018-05-24 23:07:04 -07:00
Treehugger Robot c8036c17ab Merge changes from topic "recovery_available"
* changes:
  fix: recovery.cflags now works
  Mark as recovery_available:true
  Add recovery_available to cc_genrule
2018-05-25 05:58:01 +00:00
Vishwath Mohan 1c54f66bd5 Restrict CFI_INCLUDE_PATHS to Arm64
This CL restricts CFI_INCLUDE_PATHS and PRODUCT_CFI_INCLUDE_PATHS to
Arm64 only.

Bug: 66301104
Test: x86 targets do not respect the include paths variables
Change-Id: I66ec2fb05435535aaf5d59fdfc7a170a4fdd4f26
2018-05-24 18:36:18 -07:00
Dan Albert e6ab4f9657 Merge changes from topic "preprocessed_ndk_headers" am: 5ae3652d99
am: 7435738d53

Change-Id: Iac614f6376163d527709ed57a37a4f3111a5dfe3
2018-05-24 17:08:48 -07:00
Jiyong Park 4a2dcb5c4b fix: recovery.cflags now works
There was a bug that recovery.cflags is ignored. Respect the property
when building for recovery.

Bug: 79146551
Test: m -j
Change-Id: I24c1c1b593c83eb1992721571c6d5c42483a41a0
2018-05-25 08:43:50 +09:00
Dan Willemsen b7adae8aaf Use new flex binary
Test: treehugger
Change-Id: Ie1d41a3ee223a80b6f471b7b1cbede63cc7051f5
2018-05-24 15:45:21 -07:00
Dan Albert 97f9c963ad Rename preprocessed_ndk_headers to versioned_ndk_headers.
The current rule runs a specific preprocessor over the source files,
and I'm adding support for generic preprocessed headers in a follow
up patch.

Test: make checkbuild
Bug: None
Change-Id: I1f3193cd595f151309e6321e1b41d8d16085379d
2018-05-24 15:12:51 -07:00
Dan Albert 19ff8b4662 Add exclude_srcs property to ndk_headers modules.
Test: make checkbuild
Bug: None
Change-Id: I2778c1140ab50abc0f7dee66da35ebacef77ea72
2018-05-24 15:12:26 -07:00
Dan Albert 7122205a5a Fix typo. Properies -> Properties.
Test: make checkbuild
Bug: None
Change-Id: I0b5e3dd44f507207f2de90e922dd7016cffce118
2018-05-24 15:12:20 -07:00
Vishwath Mohan 9b87f812ea Disable CFI for vendor variants of VNDK libraries
am: 7589c82eec

Change-Id: I3d44d7c66d777df15ce8ecbd7f4577eaf293affb
2018-05-24 14:43:32 -07:00
Vishwath Mohan 7589c82eec Disable CFI for vendor variants of VNDK libraries
Enabling CFI changes the VNDK ABI from the frozen snapshot, so the
only solution for now is to temporarily disable CFI on all vendor
variants for the sake of compatibility.

Bug: 66301104
Test: ABI is consistent.
Change-Id: Ie7dca41e0f647808b08adede09a30f3c746e6bda
2018-05-23 23:39:38 -07:00
Jiyong Park 6caa21aa82 Mark as recovery_available:true
Libraries that are direct or indirect dependencies of modules installed
to recovery partition (e.g. adbd) are marked as recovery_available:
true. This allows a recovery variant of the lib is created when it is
depended by other recovery or recovery_available modules.

Bug: 79146551
Test: m -j
Change-Id: I1181fa0646d840c0194e4af2043ec228ec9eff16
2018-05-24 14:14:08 +09:00
Jiyong Park 3f736c9661 Add recovery_available to cc_genrule
recovery_available property is required in cc_genrule. Specifically,
we will mark libminijail as recovery_available:true as part of building
adbd and other stuffs for recovery. Some source code of libminijail is
created via cc_genrule, so we need recovery_available in the module
type.

Bug: 79146551
Test: m -j
Change-Id: I0cf0d9b1004dda055373573e5c5a7debd112685f
2018-05-24 14:01:54 +09:00
Vishwath Mohan 165e01b744 Merge "Allow abi diffs sanitized variants of vndk libraries on production devices." into pi-dev 2018-05-23 17:47:38 +00:00
Christopher Ferris 1a6e5c0c15 Remove cortex-a53 linker workaround for new cpus.
Bug: 78133793

Test: Built target with cortex-a53 and verified that the flag is still
Test: there.
Test: Build target with cortex-a55/cortex-a75 and verified that the flag
Test: is not there.
Test: Built and booted on a taimen, ran bionic unit tests.
Change-Id: Ibd7f497ecf46e5781cd0265463b0782babdf062a
Merged-In: Ibd7f497ecf46e5781cd0265463b0782babdf062a
(cherry picked from commit a98d721485)
2018-05-21 12:57:51 -07:00
Jayant Chowdhary 3e2f0ff226 Temporarily remove -check-all-apis from header-abi-diff invocation.
-check-all-apis currently, produces noise for some libraries
(eg:libstagefright_soft_vpxenc), so remove this till a good solution
arrives.

Bug: 79928919

Test: create abi reference for libstagefright_soft_vpxenc; m -j
      libstagefright_soft_vpxenc.vendor; no warnings about struct LAYER_CONTEXT
      layout changing.

Merged-In: I8f30700c1b619c72504ca9aef69075f6e334ba5f
Change-Id: I8f30700c1b619c72504ca9aef69075f6e334ba5f
(cherry picked from commit 39d167aa2c)
2018-05-18 11:38:34 -07:00
Jayant Chowdhary 4c9cbf2d63 Temporarily remove -check-all-apis from header-abi-diff invocation. am: 39d167aa2c
am: dd15760c35

Change-Id: Ief2cec5011d5b9066dfd12a7f2632ffa2b37e736
2018-05-18 11:37:53 -07:00
Jayant Chowdhary 39d167aa2c Temporarily remove -check-all-apis from header-abi-diff invocation.
-check-all-apis currently, produces noise for some libraries
(eg:libstagefright_soft_vpxenc), so remove this till a good solution
arrives.

Bug: 79928919

Test: create abi reference for libstagefright_soft_vpxenc; m -j
      libstagefright_soft_vpxenc.vendor; no warnings about struct LAYER_CONTEXT
      layout changing.

Change-Id: I8f30700c1b619c72504ca9aef69075f6e334ba5f
2018-05-18 08:10:58 -07:00
Ivan Lozano 1838ef9be4 Don't export UBSan minimal runtime symbols.
When linking in the UBSan minimal runtime, don't export the symbols.
This was resulting in an edge case where symbols were sometimes
undefined at runtime on address sanitized builds if static library
dependencies were integer overflow sanitized.

Bug: 78766744
Test: readelf on libraries show either inclusion of the shared library
or no undefined symbols related to the minimal runtime.

Change-Id: Ide85c8c6b53b400ce9166ccaf96d250797fe4b24
Merged-In: Ide85c8c6b53b400ce9166ccaf96d250797fe4b24
(cherry picked from commit 59fdea2ac2)
2018-05-16 10:42:39 -07:00
George Burgess IV 739e92e036 Merge "Disable dtor inlining for clang-tidy" am: 5e011a2531
am: e4f8bd3770

Change-Id: I1177a324072e2f2689d5870d973b1cfea989e710
2018-05-15 15:41:26 -07:00
Treehugger Robot 5e011a2531 Merge "Disable dtor inlining for clang-tidy" 2018-05-15 22:15:55 +00:00
Christopher Ferris 6290b64f3d Remove cortex-a53 linker workaround for new cpus.
am: 79dff70b46

Change-Id: Ib6e6b334611973c524c850ce8133fe0885f7f0a3
2018-05-15 15:03:24 -07:00
Ivan Lozano 3262054a81 Merge "Don't export UBSan minimal runtime symbols." am: 9bf049dcbb
am: faa09cd8c2

Change-Id: Ic47917f3fece1ddd2a571c155f69ddc7761b90af
2018-05-15 13:04:26 -07:00
Christopher Ferris 79dff70b46 Remove cortex-a53 linker workaround for new cpus.
Bug: 78133793

Test: Built target with cortex-a53 and verified that the flag is still
Test: there.
Test: Build target with cortex-a55/cortex-a75 and verified that the flag
Test: is not there.
Test: Built and booted on a taimen, ran bionic unit tests.
Change-Id: Ibd7f497ecf46e5781cd0265463b0782babdf062a
2018-05-15 11:23:01 -07:00
Ivan Lozano 59fdea2ac2 Don't export UBSan minimal runtime symbols.
When linking in the UBSan minimal runtime, don't export the symbols.
This was resulting in an edge case where symbols were sometimes
undefined at runtime on address sanitized builds if static library
dependencies were integer overflow sanitized.

Bug: 78766744
Test: readelf on libraries show either inclusion of the shared library
or no undefined symbols related to the minimal runtime.

Change-Id: Ide85c8c6b53b400ce9166ccaf96d250797fe4b24
2018-05-15 08:37:18 -07:00
Jiyong Park 07ba19c49e Support recovery and recovery_available am: f9332f1c86
am: 84c2e79acf

Change-Id: I3e99976bd8277a7f318e28e2357ac3853c64d5db
2018-05-15 02:17:44 -07:00
Jiyong Park f9332f1c86 Support recovery and recovery_available
`recovery: true` installs a module to the recovery partition.
`recovery_available: true` makes a module to be available to other
`recovery:true` or `recovery_available: true` modules.

These to are very similar to vendor, vendor_available properties, except
for the target partition.

Bug: 67916654
Bug: 64960723
Test: m -j, toybox_recovery is installed to the recovery/root/sbin
Change-Id: Iaebe0593de16c69fa70de251a61f4d018a251509
2018-05-15 16:27:12 +09:00
Dan Willemsen 5cd937bdc9 Merge "Remove the unused `tags` property" am: ff9d8911f6
am: ff1b69616d

Change-Id: I2800ceee079e1236992d116102ed847d28b8a223
2018-05-15 00:16:29 -07:00
Jayant Chowdhary f267f715eb Allow abi diffs sanitized variants of vndk libraries on production devices.
Previously abi diffs were allowed only on unsanitized variants of vndk
libraries. This CL allows them on all sanitized variants which go onto
production devices, eg: cfi variants.

Bug: 66301104

Test: Without this change, for arm64 libstagefright_foundation doesn't
      get an lsdump file since we don't build an unsanitized variant
      (aosp_arm64_ab).

Test: With this change, for arm64 libstagefright_foundation does
      get an lsdump file (aosp_arm64_ab)

Merged-In: I94f82fd84fc898e4980c3f3619df9677ed723c32
Change-Id: I94f82fd84fc898e4980c3f3619df9677ed723c32
(cherry picked from commit b7e08ca830)
2018-05-14 18:34:40 -07:00
Dan Willemsen f923f2b54c Remove the unused `tags` property
And fix up androidmk / bpfix to provide warnings about what to do
instead.

Test: m blueprint_tools  (runs the tests, ensures there aren't any tags left)
Change-Id: I1a3ad8600211050420041740207d6957f44463c8
2018-05-15 00:33:11 +00:00