Commit Graph

49 Commits

Author SHA1 Message Date
William Escande
578c0d3186 Move user file along to the new package name
Repro step:
* Flash old build
* Pair device
* Change it's metadata:
   * Change connection_policy
   * Change Volume
   * Change phone_access
* build and flash without wipe
* observe device metadata

Test: Repro step above
Bug: 234063703
Ignore-AOSP-First: will be picked later
Change-Id: I230be7dd8d657679c2b33c6324f3b525a98d1e2d
2022-06-22 14:01:10 -07:00
Hsin-Yi Chen
ddcf30d384 RESTRICT AUTOMERGE Ignore weak symbol difference in libc++ ABI check
The diff_flags make the ABI checker ignore the weak symbol difference
caused by PGO.

Test: make libc++.vendor
Bug: 230076879
Change-Id: Ifff053fd9a1411cbe73ab48359ffa6f49bec4490
2022-05-26 04:38:02 +00:00
Colin Cross
bdf5fe7af5 Export libc++ headers for musl sysroot
Export the libc++ headers for inclusion in the musl sysroot so that
the clang runtimes can link against them.

Bug: 215802826
Test: musl llvm build
Change-Id: Ia661da7ad7158e09b3e956ab93159e3e42855424
2022-02-25 18:30:07 -08:00
Yi Kong
df8cb36848 Move pgo rules to afdo
Test: presubmit
Change-Id: Ic590208e2163e7703c3493dbe435cbe2ac7cce33
2022-01-06 16:04:07 +08:00
Jiakai Zhang
978cfa2e7a Allow the ART module to use "libc++fs".
This is used by odrefresh, which needs to do many filesystem
operations. It is only used as a static library.

Bug: 205276874
Test: m nothing
Change-Id: Id4cd9e2674d32b48ab82d88ac3acb93d37ca8627
2021-11-12 16:53:21 +00:00
Dan Albert
911760b18e Add another warning to the libc++ Android.bp.
Test: submit and wait for decrease in IMs
Bug: None
Change-Id: Icf56e0d6394f0b82db865225119c8c476b698605
2021-08-20 13:54:03 -07:00
Elliott Hughes
bb48d640b3 Update the bug that's blocking libc++fs for vendor code.
We're still working on it, but having a bug that's already been closed
in the comment makes it look like this is actually ready.

Bug: http://b/175635923
Test: N/A
Change-Id: Ied229bc423fc4550d2e235acd45ebc38d7dcd507
2021-08-11 11:53:45 -07:00
Inseob Kim
e8660a008b Add ramdisk_available to init_first_stage's deps
Bug: 187196593
Test: boot
Change-Id: I8bdb8dda3417aa0ab01f22c4103a9d2e52baf529
2021-06-14 11:56:55 +09:00
Yi Kong
c74f1b6bac PGO for libc++
This improves app launch time by 0.76%.

Test: presubmit
Bug: 181102883
Bug: 175205560
Change-Id: Ic541e376d3c907c6d896621e5afedba8e1045f88
2021-02-24 18:11:18 +08:00
Bob Badour
e120486753 [LSC] Add LOCAL_LICENSE_KINDS to external/libcxx
Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-MIT SPDX-license-identifier-NCSA
to:
  Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I36daefefdf3ea2b62cdb56e2ac13a810091d5283
2021-02-12 21:15:54 -08:00
Justin Yun
8b6fee83e3 Add "product_available" to product available modules
"vendor_available" modules were available to product modules.
However, not all "vendor_available" modules are required to be
available to product modules. Some modules want to be available only
to product modules but not vendor modules.

To cover the requirement, we separate "product_available" from
"vendor_available".
"vendor_available" will not provide product available module.

Bug: 150902910
Test: build
Change-Id: I8e85af2a4e33836092816d38d9bbd7b43dd87d77
2020-11-11 16:25:19 +09:00
Yifan Hong
ffa20c359b Merge "Make vendor_ramdisk_available." 2020-10-29 17:17:28 +00:00
Yifan Hong
6086566122 Make vendor_ramdisk_available.
Test: pass
Bug: 156098440
Change-Id: Ibaded847b1d92eb6de8dd3aa31c8dc54bfb28de7
2020-10-21 18:42:26 -07:00
Pirama Arumuga Nainar
9057c2f748 Do not set -fsjlj-exceptions locally for Windows
Bug: http://b/116784799

This is set globally for all 32-bit Windows compilations in build/soong.

Test: go/android-llvm-windows-testing
Change-Id: I0ff6c21942929e92f790ee7dbcfad00309a7aec6
2020-09-09 17:53:06 -07:00
Jooyung Han
f65f67c622 Set min_sdk_version to be part of mainline modules
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

"apex_inherit" is a special alias to represent "the minimum of all
that the apexes require".

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 152655956
Test: m
Change-Id: I23cb55a3a17ac242e7f599fe574ca30074b43506
2020-05-02 02:20:32 +09:00
Dan Albert
eda4e913a5 Note about why this isn't vendor_available.
Test: None
Bug: None
Change-Id: I0c37a344dfb542000424615dfbead3ff7eab8aab
2020-04-13 12:08:37 -07:00
Jiyong Park
2d6d9ab848 Set apex_available property
The marked library(ies) were available to the APEXes via the hand-written
whitelist in build/soong/apex/apex.go. Trying to remove the whitelist
by adding apex_available property to the Android.bp of the libraries.

Bug: 150999716
Test: m
Change-Id: I60e1ae6fa837772c2682d4a26ea34bd80e69bc9e
2020-03-07 17:44:01 +09:00
Yifan Hong
5488d3c961 Make ramdisk_available.
Test: pass
Bug: 147347110
Change-Id: If00a2f7c12100c76c25da4501ae40fa02e44634d
2020-01-22 12:09:34 -08:00
Peter Collingbourne
fa2de1c6b1 Change libc++ to stop statically linking the unwinder.
Bug: 144430859
Change-Id: I012d03c244be7a8222c2b95b0f8cd9a971b87a85
2020-01-10 11:40:09 -08:00
Colin Cross
50f73d79e4 Remove -nodefaultlibs and -nostdinc++
-nostdinc++ is already passed by the build system for stl: "none".
-nodefaultlibs was prevoiusly passed by the build system, but has
been replaced with -nostdlib++ to avoid having to manually pass
all the other default libraries on the command line.  Passing
-nodefaultlibs here causes libc++ to no longer link against libc.

Test: m checkbuild
Change-Id: Ib3392d545f68be594800fe806ecd365f830d201e
2019-10-03 16:05:33 -07:00
dimitry
a44472d932 libcxx supports native_bridge
The library can be used to  build binaries
for translated architectures.

Bug: http://b/77159578
Test: make
Change-Id: I3c41a52d599bae2c50feb937267295d9ea8844ca
2019-05-06 12:37:14 +02:00
Bowgo Tsai
9c713b6c43 Adding libc++fs to recovery available
This is for init, which is recovery available, to use std::filesystem.

Bug: 126493225
Test: build pass
Change-Id: I4012f99bcfacf57e45f9f7fd04f76311c279a914
2019-04-17 17:26:22 +08:00
Dan Albert
fd86c1f3ed Enable testing C++ coroutines TS.
Test: ./run_tests.py --bitness 32
Test: ./run_tests.py --bitness 64
Test: ./run_tests.py --bitness 64 --host
Bug: None
Change-Id: I620c999b6c156129257d3937b0893f45a6d3fddd
2019-02-28 15:11:47 -08:00
Dan Albert
4d4d6a8f06 Add std::filesystem support.
Test: ./run_tests.py --bitness 32
Test: ./run_tests.py --bitness 64
Test: ./run_tests.py --bitness 64 --host
Bug: None
Change-Id: Ie277f503b754321eba04b906fa4ee6d670b2c1b2
2019-01-10 21:26:33 -08:00
Dan Albert
fc8f268b2c Add and test libc++experimental.
Test: ./run_tests.py --bitness 32
Test: ./run_tests.py --bitness 64
Test: ./run_tests.py --bitness 64 --host
Bug: None
Change-Id: I9f712f8f73a8335aadf82af6686158de819442be
2019-01-09 21:29:39 -08:00
Dan Albert
91714f98f6 Adapt to upstream changes.
Test: ./run_tests.py --bitness 32
Test: ./run_tests.py --bitness 64
Test: ./run_tests.py --bitness 64 --host
Bug: None
Change-Id: I1b2870b44492fb674884a08a541387f566067cb0
2019-01-08 15:38:06 -08:00
Elliott Hughes
58fffb452e Fix macOS build.
Before:

  ld: unknown option: --strip-all

Test: none, since I don't have a Mac
Change-Id: Iebb5607173fc6e91ac1c5aaf703e5e1728c5b098
2018-12-12 10:53:35 -08:00
Peter Collingbourne
26cd9b82f8 Update run_tests.py to use Soong.
run_tests.py had bitrotted since it was last run (e.g. it used perl
which is now not allowed and the warning flags were out of date).
I changed it to use a different way of extracting the compile command
which is based on Soong instead of makefiles. This way is also
compatible with multiple build directories since it doesn't clobber
the source directory and doesn't require OUT_DIR == out.

This also changes run_tests.py to run the libcxxabi tests as well,
since they can be run using the same mechanism.

Bug: 120510768
Test: ./run_tests.py --bitness 32
Test: ./run_tests.py --bitness 64
Test: ./run_tests.py --bitness 64 --host
Change-Id: Id30129161f8519fa6c1bc106727326373ca9ab82
2018-12-05 15:47:23 -08:00
Dan Willemsen
abaea79206 Remove libunwindbacktrace from linux_bionic
Bug: 31559095
Test: attempt to build host bionic
Change-Id: I494500e4feea78ec587cab83f24a96a4735ec6a1
2018-10-11 23:47:11 -07:00
Pirama Arumuga Nainar
5383d2f0ba Enable libcxx_static for Windows
- Use Win32 threads.  MinGW pthreads throws an error when building
libcxx since it's pthread_mutex_initializer is not constant (needs a
cast).
- Disable visibility annotations for libcxx and libcxxabi since we are
only going to support these as static libraries.
- Build sources for Windows platform support.
- Use SjLj exceptions for 32-bit.  libgcc_eh implements SjLj exception
model for 32-bit.
- Undefine WIN32_LEAN_AND_MEAN macro.  libcxx sources define them where
necessary.

Test: Build and test Windows binaries under Wine.

Change-Id: I76a440ff5d71eb5a3b7d57dd97e742a458ffbe16
2018-09-21 15:11:33 -07:00
Jiyong Park
bfb1424a25 Mark as recovery_available: true
Libraries that are direct or indirect dependencies of modules installed
to recovery partition (e.g. toybox) 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: 67916654
Bug: 64960723
Test: m -j
Change-Id: I3dbc481be7ec367530adb57b1f4c92ce4b0db31a
2018-04-27 21:47:53 +09:00
Dan Albert
80bd2e4b23 Adapt to upstream changes.
Test: mma
Test: ./run_tests.py --bitness 64
Bug: None
Change-Id: I2f181c661253dffad5325c92c5fd4c05e741850f
2018-02-08 15:46:30 -08:00
Goran Jakovljevic
98a90189db Revert "Fix mips and mips64 builds."
This reverts commit b5b70be878.

If __unix__ is defined on mips/mips64 (other CL under the same topic),
we will avoid warnings such as:

  * external/libcxx/src/thread.cpp:105:9: error: hardware_concurrency
    not yet implemented

Test: successful build and boot aosp_mips-eng
Test: successful build and boot aosp_mips64-eng
2017-10-18 16:41:58 +02:00
Stephen Hines
b5b70be878 Fix mips and mips64 builds.
MIPS triggers some warnings in libc++ such as:
external/libcxx/src/thread.cpp:105:9: error: hardware_concurrency not yet implemented [-Werror,-W#warnings]

Test: external/clang/build.py
Change-Id: I5ccb4ffe902e29cf74de220f9610da13b1070dc1
2017-10-04 23:29:28 -07:00
Dan Willemsen
8204da4a16 Rename target.linux[_x86[_64]] to target.linux_glibc[_x86[_64]]
In the future, target.linux will apply to all targets running a linux kernel
(android, linux_glibc, linux_bionic). So move all current users to the specific
linux_glibc.

There will be another cleanup pass later that will move some instances back to
target.linux if the properties should be shared with target.android and
target.linux_bionic, but target.linux needs to be removed first.

Test: out/soong/build.ninja identical before/after
Change-Id: Id07a511f47db522d27d18ea906bc086cf2aa51e4
Exempt-From-Owner-Approval: build system cleanup
2017-10-02 10:41:09 -07:00
Chih-Hung Hsieh
c24221d53f Use -Werror in external/libcxx
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I493445988aecae2cafcc50de23d10bf6dea43b3a
2017-09-29 09:03:46 -07:00
Dan Willemsen
37cf022706 Remove default libraries
libdl is part of system_shared_libs now. -ldl -lpthread -lm are now defaults
for host_ldlibs on Linux and Darwin. -lrt is a default for host_ldlibs on
Linux.

Test: m host
Change-Id: I296fe8b93fdc8edd623381a3983ba26534b45af2
Exempt-From-Owner-Approval: build system cleanup
2017-09-28 17:31:50 -07:00
Lennart Wieboldt
0f0034c24d Remove clang: true
clang is the default compiler since Android nougat

Test: mma & verified it´s still build with clang

Change-Id: I4d251ac8b0365165653351e254991d4064c74dc4
Signed-off-by: Lennart Wieboldt <lennart.1997@gmx.de>
2017-09-10 11:45:34 +02:00
Justin Yun
6e22fc8c73 Mark the module as VNDK or VNDK-SP in Android.bp
As a VNDK/VNDK-SP module, Android.bp must have 'vndk' tag as well
as 'vendor_available: true'.

For a VNDK module, the 'vndk' tag has 'enabled: true'.
It will be installed system/lib(64)/vndk as a vendor variant.

For a VNDK-SP module, the 'vndk' tag has
'support_system_process: true' as well as 'enabled: true'.
It will be installed system/lib(64)/vndk-sp as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Merged-In: I8df3b9ec1a867fdbaac8cf348da4cfd56433435b
Change-Id: I8df3b9ec1a867fdbaac8cf348da4cfd56433435b
(cherry picked from commit 82c0df65eb)
2017-08-23 18:02:38 +09:00
Dan Willemsen
4cef24ee3c Mark as vendor_available
By setting vendor_available, the following may become true:

* a prebuilt library from this release may be used at runtime by
  in a later releasse (by vendor code compiled against this release).
  so this library shouldn't depend on runtime state that may change
  in the future.
* this library may be loaded twice into a single process (potentially
  an old version and a newer version). The symbols will be isolated
  using linker namespaces, but this may break assumptions about 1
  library in 1 process (your singletons will run twice).

Background:

This means that these modules may be built and installed twice --
once for the system partition and once for the vendor partition. The
system version will build just like today, and will be used by the
framework components on /system. The vendor version will build
against a reduced set of exports and libraries -- similar to, but
separate from, the NDK. This means that all your dependencies must
also mark vendor_available.

At runtime, /system binaries will load libraries from /system/lib*,
while /vendor binaries will load libraries from /vendor/lib*. There
are some exceptions in both directions -- bionic(libc,etc) and liblog
are always loaded from /system. And SP-HALs (OpenGL, etc) may load
/vendor code into /system processes, but the dependencies of those
libraries will load from /vendor until it reaches a library that's
always on /system. In the SP-HAL case, if both framework and vendor
libraries depend on a library of the same name, both versions will be
loaded, but they will be isolated from each other.

It's possible to compile differently -- reducing your source files,
exporting different include directories, etc. For details see:

https://android-review.googlesource.com/368372

None of this is enabled unless the device opts into the system/vendor
split with BOARD_VNDK_VERSION := current.

Bug: 36426473
Bug: 36079834
Test: Android-aosp_arm.mk is the same before/after
Test: build.ninja is the same before/after
Test: build-aosp_arm.ninja is the same before/after
Test: attempt to compile with BOARD_VNDK_VERSION := current
Change-Id: I5aa9e3463c53a2c13110d6fffb61a2bbc09892f2
2017-04-10 18:14:29 -07:00
Dan Albert
c0ecf33175 Update Android.bp for upstream changes.
Add a new define and a new source file.

Test: mm
Bug: http://b/34740564
Change-Id: I2a924e9f7e8d4d007b7f1119216b85716b97bb71
2017-01-27 16:40:33 -08:00
Dan Willemsen
eab4a7b5f1 Enable libc++ on host bionic
Bug: 31559095
Test: out/soong/build.ninja is identical before/after
Test: Test linux_bionic compile
Change-Id: I01bfee1fd69c2757d541e1c8ffdfa15bcfa846a9
2016-11-28 21:38:32 -08:00
Colin Cross
3b4ee2622b Fix linking libc++ on mac
Darwin seems to have trouble with weak symbols, adding
-Wl,-undefined,dynamic_lookup moves the problem to runtime where it
seems to work.

Test: aidl-cpp builds and starts
Change-Id: Ia8553abd5a9b61ed65dd4b064e57d30ad2418263
2016-11-18 11:32:11 -08:00
Dan Austin
1418e4163d Add compile time define that was missing.
There used to be a check for `__has_include(<cxxabi.h>)`, but it
was removed because it is a clang extension. This adds
-DLIBCXX_BUILDING_LIBCXXABI to the mk and bp files to fix this.

Change-Id: Ife2f93ace8c2766c0140fba88bf74a941ed8e57e
2016-05-24 16:24:42 -07:00
Colin Cross
d605181929 Reenable libc++ host dynamic lib
prebuilts/sdk/tools/.../libc++.so no longer gets installed, so it
doesn't conflict with this definition.

Change-Id: I832aca3898c47ad97b29222c2728cfe2173d56df
2015-12-15 16:08:50 -08:00
Dan Willemsen
e368a1fd04 soong: Use new linker file properties
So that dependencies are set up properly

Change-Id: I027eb0f69d85a8afb40b0bc30719ab47ea6c8874
2015-12-04 15:51:10 -08:00
Colin Cross
47a9376d51 Disable host libcxx.so for apps builds
Change-Id: Ib176923464f1f8c5f414cc5b869c60c3561484a1
2015-12-01 16:32:21 -08:00
Colin Cross
286a75e86e libcxx: Update Android.bp to match Android.mk
Change-Id: Iffe0b0c13a23d15a6cc2c7805fc4f99477e230a4
2015-11-19 14:33:56 -08:00
Dan Willemsen
00e6a4feec Add Android.bp for libc++
Change-Id: I3986c5d28cf5f9e3c6a5aa81862943359f7ed5f6
2015-09-16 14:46:10 -07:00