Commit graph

934 commits

Author SHA1 Message Date
Treehugger Robot
4fe7c6aee8 Merge "Update NdkMaxPrebuiltVersionInt." 2018-01-19 23:48:32 +00:00
Ivan Lozano
c1fecc2dfa Merge "Support enabling overflow sanitization by path." 2018-01-19 15:55:38 +00:00
Treehugger Robot
d40471c7c8 Merge "VNDK snapshot modules must have vndk subdirectory" 2018-01-19 07:14:27 +00:00
Treehugger Robot
b0712e8014 Merge "Use -advice-only for libraries which do not export headers." 2018-01-19 05:20:33 +00:00
Justin Yun
3e15b96234 VNDK snapshot modules must have vndk subdirectory
VNDK snapshot modules must have vndk subdirectory for their
LOCAL_MODULE_PATH regardless of BOARD_VNDK_VERSION definition.
The snapshot target output file must be not changed.

Bug: 71782197
Test: Build marlin with snapshot in the source and boot
Change-Id: I2b6ec9a5c20d6a5014f690d4eb8e6cd7b3b2f2fa
2018-01-19 12:19:24 +09:00
Justin Yun
74c3f5c9d1 Include VNDK snapshot modules only if the arch matches
If the target_arch for the snapshot module does not match with
the build variable TARGET_ARCH, hide the module from the make file.

Bug: 71787263
Test: Install VNDK snapshot v27
      lunch aosp_arm64_ab-userdebug; m vndk_v27_arm64
      - vndk libs must be installed
      m vndk_v27_arm
      - no vndk libs must be installed because target does not match

Change-Id: I32ab5004832a4164e1b2c056ad149ede50828b92
2018-01-19 09:48:45 +09:00
Jayant Chowdhary
e44995078f Use -advice-only for libraries which do not export headers.
While diffing abi, for libraries which do not export headers, use
-advice-only.

Test: Create reference dump for libdl; mm -j64; header-abi-diff gets
      invoked with '-advice-only'.

Test: Create reference dump for libjpeg; mm -j64; header-abi-diff gets
      invoked without '-advice-only'.

Bug: 71768219

Change-Id: I678346081f15088388f223f1276d0b0c42d2a8c2
2018-01-18 15:52:43 -08:00
Ivan Lozano
17df3c1b76 Support enabling overflow sanitization by path.
Handle paths variable provided from Make about where integer overflow
sanitization should be enabled by default, and prepare to enable minimal
runtime diagnostics for integer overflow sanitizers in userdebug/eng builds.

This provides Soong support for on-by-default paths from Make for
integer overflow sanitization.

Bug: 30969751
Bug: 63927620
Test: Include paths passed from Make are being sanitized.
Test: Compilation succeeds with and without diagnostics enabled.
Test: See Make patch for further test notes.

Change-Id: I803a75646cc27ef5b4b5b74b8eb2981c39f8a6a3
2018-01-18 14:16:47 -08:00
Dan Albert
c715eda106 Update NdkMaxPrebuiltVersionInt.
We have newer NDK prebuilts now.

Test: make checkbuild
Bug: None
Change-Id: I00ba5d1638832bc0feff46599afbaa201294fdad
2018-01-18 13:25:41 -08:00
Pirama Arumuga Nainar
64946fec54 Update profile_file discovery rules
Bug: http://b/63768402

Profile files are searched in multiple directories in a pre-define list,
instead of just one.

PGO profile_file enforcement is also removed - profile_file dependency
and -fprofile-use are added iff the profile_file is present.

Test: Build https://android-review.googlesource.com/c/474805 with
.profdata files in vendor/google_data/pgo-profiles and
toolchain/pgo-profiles and verify expected behavior.

Change-Id: I2604713a8a7a682bd5c6bde569dc32335be5eca9
Merged-In: I2604713a8a7a682bd5c6bde569dc32335be5eca9
2018-01-18 10:26:34 -08:00
Jayant Chowdhary
df344d57b0 Remove the use of version scripts with header-abi-linker.
Version scripts were earlier used as a symbol map, primarily for llndk
libraries. Since they do have stub libraries which contain symbols, we
shall use them instead, to internally form symbol maps in
header-abi-linker.

Test: mm -j64 in bionic/libdl, header-abi-linker gets invoked with
      -so <so-file> rather than -v <version-script>

Change-Id: Ifb67dc34457a997f37cc9f71ca16ad068e9b44c1
2018-01-17 11:17:40 -08:00
Stephen Hines
2e020842dc Merge "Remove unnecessary DeviceUsesClang." 2018-01-12 18:19:45 +00:00
Treehugger Robot
2835af801c Merge "Disable availability macros in libc++ on Darwin." 2018-01-12 05:46:22 +00:00
Treehugger Robot
7d3e0709a5 Merge "Remove armv5te" 2018-01-12 05:41:11 +00:00
Stephen Hines
6ea0f81c3f Remove unnecessary DeviceUsesClang.
This build function is unnecessary now that GCC is completely
unsupported for Android platform builds. It is similar to
USE_CLANG_PLATFORM_BUILD from the build/make side of things.

Bug: http://b/64032869
Test: Builds
Change-Id: Iddf5f91cc997c337c77a644265cb8dc4e5a915b4
2018-01-11 14:29:41 -08:00
Dan Albert
a07b84598f Disable availability macros in libc++ on Darwin.
libc++'s headers are annotated with availability macros that indicate
which version of Mac OS was the first to ship with a libc++ feature
available in its *system's* libc++.dylib. We do not use the system's
library, but rather ship our own. As such, these availability
attributes are meaningless for us but cause build breaks when we try
to use code that would not be available in the system's dylib.

Test: removed the darwin check and checked showcommands on linux
Bug: None
Change-Id: I3d328d7363eba83f1cb857c8abfd6cd0173a3058
2018-01-11 13:00:46 -08:00
Treehugger Robot
4acd66ae94 Merge "Switch back to llvm-ar (with crsD flags only)." 2018-01-11 07:36:07 +00:00
Stephen Hines
f1addebb44 Switch back to llvm-ar (with crsD flags only).
This properly sets -format=gnu for all non-Darwin targets, because
llvm-ar is cross-platform (but defaults to the host environment).

Bug: http://b/71618641
Test: m checkbuild
Change-Id: Ic5bce7e237ea0cadfa1f96ea151d41115d8c56b8
2018-01-10 15:57:49 -08:00
Dan Willemsen
f3768f5011 Merge "Switch to build-tools bison" 2018-01-10 21:49:28 +00:00
Treehugger Robot
2605a61f2d Merge "Remove support for stlport." 2018-01-09 23:38:39 +00:00
Dan Willemsen
6f46a38e56 Switch to build-tools bison
Test: m
Test: mma system/tools/hidl
Change-Id: I467c63792082ef335f2d7788d538db76e9e91d87
2018-01-08 17:34:47 -08:00
Dan Willemsen
e401a8315e Remove armv5te
This architecture only existed for unbundled use, but even the NDK is
removing support in their r17 release, so just remove support for it.

Test: build/soong/build_test.bash -only-soong
Change-Id: I4bd23babf567128d2d242cbdee3311abb198dd7c
2018-01-08 15:48:25 -08:00
Treehugger Robot
e6f4ee2061 Merge "Add target.vendor.override_export_include_dirs." 2018-01-08 22:15:51 +00:00
Yi Kong
8a832c3e6d Merge "Revert "Switch to llvm-ar (with crsD flags only)."" 2018-01-08 19:51:19 +00:00
Yi Kong
df97a8ac9c Revert "Switch to llvm-ar (with crsD flags only)."
This reverts commit 13bc31d6e1.

Bug: 71694982
Reason for revert: Broke Mac build

Change-Id: I0da6866442ca9273dd329f0b82932f939b7f65ed
2018-01-08 18:10:35 +00:00
Steven Moreland
b21df8f66f Add target.vendor.override_export_include_dirs.
This property was originally called export_include_dirs,
but because it has different semantics, it is renamed
here to override_export_include_dirs.

Bug: 62878521
Test: soong finds targets which use this property properly
Change-Id: Iac7c2a89ee8e389977c7a8e3b8c03c1a0d1608bb
2018-01-06 01:35:35 +00:00
Treehugger Robot
0a8a2720e2 Merge "Remove support for gnustl." 2018-01-06 01:12:21 +00:00
Yi Kong
aa92b80bc3 Merge "Switch to llvm-ar (with crsD flags only)." 2018-01-05 22:54:53 +00:00
Chih-hung Hsieh
c355edc09b Merge "Add default -Werror to hardware/qcom projects" 2018-01-05 21:54:50 +00:00
Dan Albert
749fc7885f Remove support for stlport.
Test: make checkbuild
Bug: None
Change-Id: I066574dd623ddd617f7cdbabbb16e01ece0b4cdc
2018-01-05 10:59:33 -08:00
Dan Albert
c9460bbff8 Remove support for gnustl.
Test: make checkbuild
Bug: None
Change-Id: Ifa457e9907e20bafa2885fbd6935d43b7f22aaaf
2018-01-05 10:59:33 -08:00
Yi Kong
13bc31d6e1 Switch to llvm-ar (with crsD flags only).
llvm-ar is required for platform LTO build.

Bug: 71618641
Test: m checkbuild
Change-Id: Idecea9fbe5dcbb1023dbe90047e3f9535d953440
2018-01-04 23:52:44 -08:00
Treehugger Robot
e7fa3b1b74 Merge "Fix crash on test failure" 2018-01-04 20:35:38 +00:00
Chih-Hung Hsieh
775edde1f8 Add default -Werror to hardware/qcom projects
Bug: 66996870
Test: normal build
Change-Id: Ic8b6a5ea808fbd0f377c7bac002a9b03bf8236be
2018-01-04 20:12:01 +00:00
Chih-hung Hsieh
0d9868c9af Merge "Call clang-tidy with -fno-caret-diagnostics by default." 2018-01-04 19:05:16 +00:00
Chih-Hung Hsieh
669cb9150e Call clang-tidy with -fno-caret-diagnostics by default.
* clang -fno-caret-diagnostics
  suppresses warning source lines, carets, and
  the stats line of "n warnings generated"
* clang-tidy -extra-arg-before=-fno-caret-diagnotics
  only suppresses the "n warnings generated" line.
* Pass this flag and -quiet to clang-tidy when
  WITH_TIDY is not 1 or true.

Bug: 69051430
Test: normal build and build with WITH_TIDY=1

Change-Id: I34e34cddc0e7329e73b5f04da4b1458dabfcd4c8
2018-01-04 01:41:16 -08:00
Jae Shin
43ef264b3a Add target_arch to vndk prebuilt module name
To distinguish libfoo.vndk.$VER prebuilts of various
vndk_v$VER_$ARCH phony package modules, append $ARCH to the
LOCAL_MODULE name for VNDK prebuilts.
e.g. libfoo.vndk.$VER becomes libfoo.vndk.$VER.$ARCH

Test: m -j PRODUCT_EXTRA_VNDK_VERSIONS=27
Bug: 71370248
Change-Id: I3e9ebd929111ceb48e362c500adfb4b7a94444e8
2018-01-04 11:02:39 +09:00
Colin Cross
95d33fe631 Fix crash on test failure
Don't check objs[0] and objs[1] if len(objs) != 2.

Test: cc_test.go
Change-Id: I2ba459a683764691ebf28db3944d7a1e9088eb76
2018-01-03 16:03:06 -08:00
Colin Cross
ee6143cde2 Add VisitDirectDepsWithTag
Add a method on ModuleContext and TopDownMutatorContext to visit
direct dependencies that have a given dependency tag.

Test: m checkbuild
Change-Id: Ib875563091dcae6b7282b3e3427d0eb07d8c8af5
2018-01-02 18:23:43 -08:00
Colin Cross
b4330e222b Move string list utility functions to android package
Test: m checkbuild
Change-Id: I50a7ccf9fd7ed82b688e3eb90489c0bc0af33287
2017-12-28 17:41:02 +00:00
Treehugger Robot
cd406fa70b Merge "Ignore 'extern "C++"' section in a version script" 2017-12-21 15:13:34 +00:00
Jiyong Park
2db7692a74 Add [soc|device|product]_specific
Added three properties (soc_specific, device_specific, and
product_specific) that shows what a module is specific to.

`soc_specific: true` means that the module is specific to an SoC
(System-On-a-Chip) and thus need to be installed to vendor partition.
This has the same meaning as the old `vendor: true` setting.

`device_specific: true` means that the module is specific to the entire
hardware configuration of a device includeing the SoC and off-chip
peripherals. These modules are installed to odm partition (or /vendor/odm
when odm partition does not exist).

`product_specific: true` means that the module is specific to the
software configuration of a product such as country, network operator,
etc. These modules are installed to oem partition (or /system/oem when
oem partition does not exist). These modules are assumed to be agnostic
to hardware, so this property can't be true when either soc_specific or
device_specific is set to true.

Bug: 68187740
Test: Build. path_tests amended.
Change-Id: I44ff055d87d53b0d2676758c506060de54cbffa0
2017-12-21 12:16:29 +09:00
Pirama Arumuga Nainar
fadb7b511a Add 'openmp' compiler property
Bug: http://b/70692399

If a module has 'openmp: true', add '-fopenmp' to CFlags during any
compile step and pass the libomp runtime to the linker during any link
step.

Test: Build samples in http://aosp/572924
Change-Id: Ic2a6410ec69aae548edaf582ee41659b0058561e
2017-12-19 23:14:19 -08:00
Treehugger Robot
6f86613420 Merge "Add compile-time pathDeps as implicit dependencies" 2017-12-20 04:05:39 +00:00
Treehugger Robot
750e6fab06 Merge "Add default -Werror to hardware/libhardware/modules" 2017-12-20 00:08:36 +00:00
Pirama Arumuga Nainar
70ba5a38d1 Add compile-time pathDeps as implicit dependencies
Bug: http://b/70820751
Bug: http://b/70857959

Clang does not output file dependencies from the -fprofile-use= flag
during -MD/-MM.  Add this and other path dependencies as implicit Ninja
dependencies.  Generated header dependencies are retained as OrderOnly
dependencies.

Test: Perturb profdata files for hwui/skia in internal branch and verify
that the sources get rebuilt.

Change-Id: I3247d995ee27a4882172eb15ff36acf56536b6f7
2017-12-19 15:44:38 -08:00
Treehugger Robot
b267295324 Merge "Expose the NDK STLs to make." 2017-12-19 00:29:52 +00:00
Treehugger Robot
26e5a168bf Merge "Call clang-tidy with -quiet unless WITH_TIDY is set." 2017-12-16 21:02:06 +00:00
Chih-Hung Hsieh
dc0c0302e9 Call clang-tidy with -quiet unless WITH_TIDY is set.
* Default builds calls clang-tidy only if enabled locally.
  In this case, clang-tidy should be quiet.
* If WITH_TIDY is 1 or true, let clang-tidy emit default messages.
* Even with -quiet and all warnings are suppressed,
  clang-tidy emits one line message of the number of suppressed messages.
  This one-liner could be suppressed in future changes.

Bug: 69051430
Test: default build and build with WITH_TIDY=1
Change-Id: I45303149930b33544e271e6d5eeddf18c9e48d7a
2017-12-15 20:57:48 -08:00
Treehugger Robot
2555b259ad Merge "Allow NDK static libraries to use the NDK sysroot." 2017-12-16 03:14:43 +00:00