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
Leave the machinery to use a symbol database around so that we can
switch over to parsing libc.map.txt in the future.
Test: tools/versioner/run_tests.py
Change-Id: Ifa8899b698764e4aeb6aa8bb2cdb2d44a67b863f
extern "C" and "C++" are parsed as a LinkageSpecDecl with the real Decl
as a child node. This leads to the preprocessor sticking its guard
between the extern specifier and the declaration.
Update the AST visitor to add a special-case for calculating the
SourceRange on a LinkageSpecDecl, and add a test.
Bug: https://github.com/android-ndk/ndk/issues/440
Test: python run_tests.py
Change-Id: I76445fe366cef46cfd2f16fb93d534d410c5edca
Bug: http://b/64121881
The modules built in the Android tree are now named
lib{LLVM,clang}_android.so. Let versioner depend on these temporarily
before eventually depending on the prebuilt libraries.
Test: aosp_marlin checkbuild with FORCE_BUILD_LLVM_COMPONENTS set and
unset.
Change-Id: I4e04dd2c74a19e0918f81bac04c1daee63ed6b24
The following scripts use `bash` specific variable `${BASH_SOURCE[0]}`
so this doesn't work correct in case when `/bin/sh` isn't `bash`.
Test: repo upload bionic
Change-Id: I12ce0666f9404107dceb03960bad4ec11b14ba2d
Signed-off-by: Sergii Piatakov <sergii.piatakov@globallogic.com>
Attribute the versioning information on `void foo() __asm("bar")` to
bar, not foo.
The various long double functions in <math.h> run into this.
Bug: https://github.com/android-ndk/ndk/issues/440
Test: python run_tests.py
Test: m
Change-Id: Idd3681ddbd006b4705608449935c9cfacfa3556e
Make the selection of a non-default API level non-fatal, so that we
won't have to continually fix all of the tests every time we remove an
API version.
Test: versioner
Test: python run_tests.py
Change-Id: I96429584e352f7e012c5129da3c02dc1b4b30061
Some declarations, like bitfield members, don't need identifiers.
Bug: https://github.com/android-ndk/ndk/issues/440
Test: ran versioner with -x c++ on a manually reduced <linux/timex.h>
Change-Id: Ic7eea780762cff653c54fdde4d10df203d630c25
GCC's FORTIFY required optimizations to be enabled in order to function
properly. Clang's FORTIFY doesn't have this limitation, so it seems
pointless to keep it disabled due to a GCC-specific limitation.
Bug: 12231437
Test: Checkbuild on bullhead internal master + CtsBionicTestCases. No
new failures.
Change-Id: I74aa35f9d3f3d2a6b11a7adfe72a787e3d7f7f36
At least one warning only triggers in files that are included, instead
of being passed directly. Switch to compiling with -include, and fix
the resulting warnings.
Bug: https://github.com/android-ndk/ndk/issues/474
Test: mma -j && versioner
Test: python tools/versioner/run_tests.py
Change-Id: I784698c18540c9cc30f372f279a1cec1d75721ea
This patch cleans up our standard headers by moving most of the FORTIFY
cruft out in to its own sandbox. In order to include the *_chk and
*_real declarations, you can either enable FORTIFY, or `#define
__BIONIC_DECLARE_FORTIFY_HELPERS`.
Both sys/select.h and strings.h are explicitly ignored by this patch.
Both of these files have very small __BIONIC_FORTIFY blocks, and don't
define any actual FORTIFY'ed functions (just macros, and 3 *_chk
functions).
This patch also makes the versioner ignore the FORTIFY implementation
headers, since we're guaranteed to pick the FORTIFY'ed headers up when
looking at the regular headers. (...Not to mention that making the
FORTIFY'ed headers freestanding would be annoying to do and maintain for
~no benefit).
We bake the knowledge of where FORTIFY headers live directly into the
versioner. We could go with a more general approach (e.g. adding an -X
IGNORED_FILE flag that tells the versioner to ignore
$HEADER_PATH/$IGNORED_FILE), but we'd then have to repeat that for every
test, every manual invocation of the versioner, etc. for no benefit
that's obvious to me.
Bug: 12231437
Test: m checkbuild on bullhead internal master + CtsBionicTestCases. no
new errors.
Change-Id: Iffc0cc609009b33d989cdaddde0a809282131a5b
Relocation packer no longer complains about missing
relocation sections.
Test: relocation-packer-unit-tests
Test: mm
Change-Id: I56814be326c15e046db1a96d14568d951f689ae2
Replace an intentional leak of a buffer allocated by realpath with a use
of android::base::Realpath.
Bug: http://b/37727515
Test: tools/versioner/run_tests.py
Change-Id: Ia7200bf0e1c485050e860e21ff15784941366bec
Add a symlink where dependencies used to live, so that `versioner`
works.
Test: versioner
Test: tools/versioner/run_tests.py
Change-Id: I86999bb79baad16039709306591cb9540fb533ca
After the new rebase of Clang, we now supports alloc_size attribute, so
we can remove the warning about switching to alloc_size once Clang has
support.
Compiler.setInvocation has changed argument type from raw pointer to
shared pointer. Add version check here so that we can build under either
old rebase or the new rebase.
Test: build
Bug: 37423073
Change-Id: I4563eaf93bae6c59a4a19318f8caa92bd361b3ab
MemoryBuffer::getOpenFileSlice asserts that the map size passed in
isn't -1 (presumably because the offset can be nonzero). Switch to
getOpenFile, which results in an identical call to the implementation
function without the assert.
Bug: http://b/37002637
Test: export FORCE_BUILD_LLVM_COMPONENTS=true
export FORCE_BUILD_LLVM_DEBUG=true
export FORCE_BUILD_LLVM_DISABLE_NDEBUG=true
mma -j && versioner
Change-Id: Ib610db9e07429aa3f64128eaef6ef555c4d1868e
This is needed to generate the NDK, so unbundled projects using the
NDK need to build this. If they don't need the NDK, they should just
remove bionic from their manifest.
Test: make checkbuild
Bug: None
Change-Id: I7db816c4a341cf34d4d11739dc64182af630ad63
Use struct stat::st_mtime instead of the underlying st_mtim, which is
called something different on Darwin.
Test: mma on linux, darwin
Change-Id: I2695a6c83ebb7d08ec56b1355e0f4bc0993a0acb