summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2021-04-15Force everything to use python3 for consistency.Elliott Hughes
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
2021-03-19bp2build: remove some bp2build_available props, use package_allowlist instead.Jingwen Chen
Test: build/bazel/scripts/milestone-2/demo.sh full Test: bazel query //bionic/... Change-Id: I737574766be898279d8bf6f3f0adb43dcc40c220
2021-02-19Add LOCAL_LICENSE_KINDS to bionicBob Badour
Added SPDX-license-identifier-Apache-2.0 to: apex/Android.bp libdl/Android.bp tools/Android.bp tools/versioner/Android.bp tools/versioner/src/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: benchmarks/Android.bp benchmarks/linker_relocation/gen/Android.bp libc/malloc_debug/Android.bp libc/system_properties/Android.bp tests/Android.bp tests/libs/Android.bp tests/libs/Android.build.dlext_testzip.mk tests/make_fortify_compile_test.mk Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-ISC SPDX-license-identifier-MIT legacy_notice legacy_unencumbered to: libc/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-MIT legacy_unencumbered to: libm/Android.bp Added SPDX-license-identifier-Apache-2.0 legacy_unencumbered to: libc/tools/Android.bp Added SPDX-license-identifier-BSD to: benchmarks/linker_relocation/Android.bp benchmarks/spawn/Android.bp libc/async_safe/Android.bp libc/malloc_hooks/Android.bp libfdtrack/Android.bp linker/Android.bp tests/headers/Android.bp tests/headers/posix/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: Ib05bcaa276b3aa71a7654ccbe8e67e1f16aec9f3
2021-02-16Fix/update notices.Elliott Hughes
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
2021-02-08Mark //bionic filegroups/genrules as bp2build_available.Jingwen Chen
Test: GENERATE_BAZEL_FILES=true m nothing && build/bazel/scripts/bp2build-sync.sh write && bazel build //bionic/... Change-Id: Ie3e0092a3a03ddc6228a9191e5b78ab206072dde
2021-02-03Convert generate-NOTICE.py to Python 3, fix name.Dan Albert
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
2021-01-07Fix versioner for clang update.Yabin Cui
Bug: 171348143 Test: build versioner. Change-Id: I7432bdba6b021fcfa22207a186978e0ca336c4cb
2020-09-22Adapt for update to clang-r399163.Stephen Hines
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
2020-07-30Cleanup for #inclusivefixit.Elliott Hughes
Not sure how this one got missed earlier. Test: treehugger Change-Id: Ia4e6f62a3d33d3ac01e3d7db836caadeed0ff63b Bug: 161896447
2020-07-21Changes for #inclusivefixit.Elliott Hughes
Test: treehugger Change-Id: I7ff0496c5c2792a41781e74634247f55b0548213
2020-06-15Use more inclusive language.Elliott Hughes
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
2020-05-01Adapt to clang-r383902Stephen Hines
This change adapts versioner to llvm::StringRef losing its implicit conversion to std::string(). Test: ./build-prebuilts.sh Change-Id: Ie1b290cf12e7044a92545470ce4f968cc55d90c9
2020-02-13Clean up mips references in the headers.Elliott Hughes
Test: treehugger Change-Id: I1997af980b9e46c7c530f9e6cb1aa407b2d63d76
2020-01-30versioner: don't require mips headers.Elliott Hughes
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
2019-12-23versioner: Add versioner_fortify_inline annotationLogan Chien
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
2019-12-23versioner: Add a built-in macro for conditional compilationLogan Chien
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
2019-12-05versioner: Migrate to clang-r370808Logan Chien
Bug: 139945549 Test: lunch aosp_arm64-userdebug && \ m versioner && \ PATH=out/host/linux-x86/bin:$PATH \ ./bionic/tools/versioner/run_tests.py Change-Id: I1a548de9d1ce82aee30144a359e215a4daf5fc2b
2019-11-06Restore _FORTIFY_SOURCE in versioner.Elliott Hughes
Bug: http://b/118991081 Test: treehugger Change-Id: I2818d8c27ecc5a48666013cdd0eaa26ec7900688
2019-09-17Remove bionicbb.Elliott Hughes
Turned down years ago, and we can get it from the history if we ever need it again... Test: N/A Change-Id: I6923bd4cbc68139e0b89149280864b9da422013d
2019-08-27versioner: Add R to codename mapLogan Chien
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
2019-08-27versioner: Update clang prebuilts to clang-r365631Logan Chien
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
2019-04-19Move libdl and linker to static NOTICE files.Elliott Hughes
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
2019-04-17Merge "Generate assembler system call stubs via genrule."Elliott Hughes
2019-04-16Remove dead script.Elliott Hughes
This is already handled by genrules. Test: N/A Change-Id: I123a971486431cc2b888df515b7bda8e408fa876
2019-04-16Generate assembler system call stubs via genrule.Elliott Hughes
There's no need to check in generated code. Test: builds & boots Change-Id: Ife368bca4349d4adeb0666db590356196b4fbd63
2019-04-11Remove seccomp upload hook.Elliott Hughes
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
2019-03-29Modernise code to use override specifierYi Kong
Generated by clang-tidy. Test: m checkbuild Change-Id: I8e23da6b8af31b291be2eefe9937ca222ea8a8c3
2019-03-14Remove __INTRODUCED_IN_FUTURE.Elliott Hughes
This hasn't been particularly useful, we haven't used it consistently, and it has caused trouble. Test: builds Change-Id: Ic5b5b5124af98aa8301e602fd75b0eb72a5fc7f6
2019-02-15Remove unused .mk file.Elliott Hughes
Test: treehugger Change-Id: I5e560247e466dd2fe0038e787756f5a47461f240
2018-12-17Generate the per-arch .map files at build time.Elliott Hughes
We shouldn't be checking in these generated files... Bug: N/A Test: ran tests Change-Id: Ib67c1ba839eacd7acebd713e1dcd4dd2c25d67f0
2018-12-04Revert "Work around bugprone-exception-escape bug."Chih-hung Hsieh
This reverts commit 153b71c4073e9512e8315673cdbd835b0646af87. Reason for revert: fixed in clang-r346389 Bug: 117120485 Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=bugprone-* Change-Id: I49971e4227d6d5772efccd551d493a0f1e68416a
2018-12-04versioner: Use llvm::opt::ArgStringListLogan Chien
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
2018-12-03C++17 is the default now.Elliott Hughes
Test: builds Change-Id: I283ae69a69da95f20ee924885321677c6d5f4429
2018-11-07versioner: Port to clang-r344140Logan Chien
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
2018-10-31versioner: Port to clang-r339409bLogan Chien
This commit ports versions to clang-r339409b and utilizes `libclang-cxx.so`. Bug: 113263746 Test: ./bionic/tools/versioner/run_tests.py Change-Id: Ib104a6c8c2c69df51cfa2760dbca125f4cfa054b
2018-10-25versioner: Build SymbolDatabase from version scriptsLogan Chien
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
2018-10-23versioner: Add 28 to version listLogan Chien
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
2018-10-01Work around bugprone-exception-escape bug.Chih-Hung Hsieh
Bug: 117120485 Test: build with WITH_TIDY=1 and global bugprone-* checks. Change-Id: I28aa2a176bd7d2ae4961877a8122a09666d85237
2018-06-22Remove relocation_packer.Elliott Hughes
We'll be using the lld built-in relocation packing going forward. Bug: http://b/110715614 Test: builds Change-Id: Ib3c086b642b8e3ab1dac022c0edef3b91665e477
2018-01-19Address a bunch of clang-tidy complaints.Elliott Hughes
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
2018-01-08Adapt to the new libc++/libc++abi update.Dan Albert
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
2017-12-12versioner: remove parsing of platforms.Josh Gao
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
2017-11-09Merge "Make versioner depend on lib{LLVM,clang}_android.so"Pirama Arumuga Nainar
2017-11-06versioner: properly handle extern "C", "C++".Josh Gao
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
2017-11-06Make versioner depend on lib{LLVM,clang}_android.soPirama Arumuga Nainar
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
2017-11-02tools: fix error when `/bin/sh` isn't `bash`Sergii Piatakov
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>
2017-10-30versioner: compile headers in both C and C++ mode.Josh Gao
Bug: https://github.com/android-ndk/ndk/issues/440 Test: python run_tests.py Change-Id: Ib572a8fdcc00f6b88a25003a085b16ce9698d692
2017-10-30versioner: follow __asm__ labels.Josh Gao
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
2017-10-24versioner: kill some obsolete versions.Josh Gao
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
2017-10-24versioner: properly handle declarations with no identifier.Josh Gao
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