The libcs we use don't need these any more (if they ever did), and we
were setting these globally in the build system anyway.
Also remove the -D_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS from versioner
which doesn't seem needed any more either.
Test: treehugger
Change-Id: I9fb225b085906a02918c5847401d6c59f7779581
* When calculating the required guard, if a per-arch `introduced`
value is less than the arch min-API, drop the per-arch guard (i.e.
reset the value to 0). This is needed for RISC-V, where we don't
parse the headers with Clang, because the highest APIs we compile
for (e.g. 23, 34) are less than the current RISC-V min API of 10000.
Resetting it to 0 here means we don't need this optimization while
generating an arch-set guard. (i.e. We don't need to calculate
max_min_version. That code should have been calculating a
"min_min_version" anyway.)
* Remove the broken all-supported-archs entry from arch_sets. It has a
few problems:
* It's redundant with the "global availability" code path above,
which is used when the declaration has no per-arch annotations.
* If this code path runs, then we generate two more guard
expressions, for !LP64 and LP64.
* Passing "" to generate_guard is broken for a non-zero version,
and for a zero version, adding an empty string to `expressions`
breaks if the vector has 2 or more expressions.
(I think consolidating per-arch info, e.g. using a single check for
__INTRODUCED_IN_32(40) __INTRODUCED_IN_64(40), is a nice idea, but
it should happen as a natural consequence of removing the
arch-independent "global availability" info in favor of always
tracking it per-arch.)
* Rewrite the arch-set guard generation. Add an optimization so that
the (__ANDROID_API__ >= N) guard for __INTRODUCED_IN_64(N) is still
useful for RISC-V as long as N is small enough. (Currently we're
checking that N is <= 10000.)
This change fixes the "preprocessor" test that run_tests.py runs. The
"slow_preprocessor_idempotence" test is still broken.
Bug: https://github.com/android/ndk/issues/1888
Test: run_tests.py
Change-Id: I3f94357465dbdb2c23fff442a31fb5083de27a97
Unlike the kernel script (where plain "riscv" was correct because that's
what the kernel uses, making no distinction between riscv32 and riscv64
in the uapi header directories), this should say "riscv64" because
that's what our build system uses.
(This wasn't caught because we haven't wired up the .bp file yet.)
Test: treehugger
Change-Id: I086aaa89e69bf4ddc484a7e93a6c413fd8c719ff
Also fill out some of the data we've fallen behind on, like "which API
levels actually exist".
Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
Signed-off-by: Xia Lifang <lifang_xia@linux.alibaba.com>
Signed-off-by: Chen Guoyin <chenguoyin.cgy@linux.alibaba.com>
Signed-off-by: Wang Chen <wangchen20@iscas.ac.cn>
Signed-off-by: Lu Xufan <luxufan@iscas.ac.cn>
Test: treehugger
Change-Id: I1939426c4a22fea14232a7a93c768691ebb242ec
Bug: http://b/150809112
This is a new upstream library that exports both the clang and LLVM C++
symbols and can replace libLLVM and (android-toolchain-only)
libclang_cxx.so.
Test: Build and run versioner
Change-Id: Ib711c29f478e00e39f26dd09917618b349f0c786
Rather than "whatever people have installed as 'python' on their machine".
I've removed check-symbols.py because that's been broken for years and
we never even noticed, and I'm not sure it's worth fixing.
Test: treehugger, manual
Change-Id: Ieb996bbdf790a18d4b1fb46a409cc240ba2a2a49
Auto-generate NOTICE files for all the directories, and for each one
individually rather than mixing libc and libm together.
Test: N/A
Change-Id: I7e251194a8805c4ca78fcc5675c3321bcd5abf0a
Python module names should be lower case and not use hyphens (the
former is a convention, the latter is a requirement for importable
modules).
Also updates the shell script to always use Python 3 so we don't need
to maintain Python 2 compatibility.
Test: repo upload, in both a python 2 and python 3 virtualenv
Bug: None
Change-Id: I486e54a12686b4e528dc6c9c47af5c7a52a7b790
This is really just a case of including the proper header for a
function.
Bug: http://b/155835175
Test: OUT_DIR=out prebuilts/clang-tools/build-prebuilts.sh
Change-Id: I0523d3ccd8cb502e8c2b8f72f137db4b60fb1dac
One turns out not to be used at all, and the pylintrc even uses the more
intention-revealing term in the machine readable part, just not the
comment!
Test: treehugger
Change-Id: I4db7f1cf4fa1aa8ee601857e4e4c400e2119887c
This change adapts versioner to llvm::StringRef losing its implicit
conversion to std::string().
Test: ./build-prebuilts.sh
Change-Id: Ie1b290cf12e7044a92545470ce4f968cc55d90c9
If we remove the mips uapi headers, versioner fails because it assumes
they're available. We'll need a new versioner prebuilt beforre we can
remove the libc/versioner-dependencies/mips* symlinks.
Test: treehugger
Change-Id: Ife6df0cb57938f806a31ec334d648df9694c3d17
This commit adds versioner_fortify_inline annotation. This annotation
indicates that the annotated function is an overloaded inline function
for _FORTIFY_SOURCE implementation. They are usually enabled/disabled
by the enable_if attribute, thus the versioner don't have to check
whether they have conflicting definitions.
Bug: 118991081
Test: source development/vndk/tools/header-checker/android/envsetup.sh && \
source build/envsetup.sh && \
lunch aosp_arm64-userdebug && \
m versioner && \
./bionic/tools/versioner/run_tests.py
Change-Id: If5c739fc0c8a218907855939c1fe5338134da7f7
This commit adds a built-in macro for conditional compilation because
__attribute__((annotate(...))) may pull unused static inline functions
into object files.
We must not generate those functions in object files because it can
result in undefined references to __strchr_chk on linux_glibc.
Bug: 118991081
Test: source development/vndk/tools/header-checker/android/envsetup.sh && \
source build/envsetup.sh && \
lunch aosp_arm64-userdebug && \
m versioner && \
./bionic/tools/versioner/run_tests.py
Change-Id: I0c9d967413ec8e8655e91316973a79b81e2129b1
This commit adds "R" to codename map because `libc.map.txt` started
using "introduced=R".
Test: PATH=prebuilts/clang-tools/linux-x86/bin:$PATH \
./bionic/tools/versioner/run_tests.py
Bug: 140110040
Change-Id: Ibc1154557c29d9580b5c527160116b24fa4c656f
This commit ports bionic version to clang-r365631.
`clang::CompilerInstance::setVirtualFileSystem(VFS)` has been replaced
by `clang::CompilerInstance::createFileManager(VFS)`.
Test: OUT_DIR=out ./prebuilts/clang-tools/build-prebuilts.sh
Bug: 140110040
Change-Id: Ia833d502765dd9885eb85026d513bdfdee3756f3
The libstdc++ directory has no copyright headers, so it was a no-op
anyway.
The interesting part will be switching libc and libm over to genrules...
Test: N/A
Change-Id: Iec92562af40c451fdcb4a7468984878ec5dba2ce
We switched to genrules already, and the lack of `set -e` in the script
means that no-one's even noticed that this script has been failing since
then...
Test: N/A
Change-Id: Ie57cc97ab4e1003a106d4667cd404d22f0ee68a2
This hasn't been particularly useful, we haven't used it consistently,
and it has caused trouble.
Test: builds
Change-Id: Ic5b5b5124af98aa8301e602fd75b0eb72a5fc7f6
This reverts commit 153b71c407.
Reason for revert: fixed in clang-r346389
Bug: 117120485
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=bugprone-*
Change-Id: I49971e4227d6d5772efccd551d493a0f1e68416a
This commit replaces `clang::driver::ArgStringList` with
`llvm::opt::ArgStringList` because starting from r344398, the alias for
`llvm::opt::ArgStringList` has been removed from the `clang::driver`
namespace.
Note: This is a step to port clang tools to clang-r346389.
See also. https://reviews.llvm.org/rL344398
Bug: 119558057
Test: cd bionic/tools/versioner; mma; ./run_tests.py
Change-Id: I9b5ff572a9af6c6ffaf2c4c9cb01c97f4b85ac22
This commit updates bionic versioner to use clang-r344140. To be
specific, this commit renames `clang::vfs::FileSystem` to
`llvm::vfs::FileSystem` and updates the headers.
Bug: 111759196
Test: bionic/tools/versioner/run_tests.py
Change-Id: I304ecae79da5a1638ae755dac92b52e314019cf1
This commit ports versions to clang-r339409b and utilizes
`libclang-cxx.so`.
Bug: 113263746
Test: ./bionic/tools/versioner/run_tests.py
Change-Id: Ib104a6c8c2c69df51cfa2760dbca125f4cfa054b
This commit adds a version script parser so that versioner can build
SymbolDatabase from version scripts.
Bug: 113263746
Test: ./bionic/tools/versioner/run_tests.py
Change-Id: Iedcfe36b51a62693668e07b86aa13592096262db
This commit adds 28 to version list so that we can pass
slow_preprocessor_idempotence. If 28 is not in the version list,
versioner will add another `#ifdef` guard and fail the test.
Bug: 113263746
Test: ./bionic/tools/versioner/run_tests.py
Change-Id: I3f21fc71ffd9e55326c4587bbc5e689eb72596b6
There were a bunch more unreasonable/incorrect ones, but these ones
seemed legit. Nothing very interesting, though.
Bug: N/A
Test: ran tests, benchmarks
Change-Id: If66971194d4a7b4bf6d0251bedb88e8cdc88a76f
C++17 removed a handful of things that are used in the libclang
headers, which are used by the versioner. Enable the flag that
re-exposes these until we have a C++17 compatible libclang.
Add a stub posix_memalign to the linker. libc++abi uses posix_memalign
when allocating exceptions, which the linker does not use.
Test: make checkbuild
Bug: None
Change-Id: I32f9d0591ef99a610f27efed90a5c9fd150f0d3e