summaryrefslogtreecommitdiff
path: root/bp2build/cc_library_static_conversion_test.go
AgeCommit message (Collapse)Author
2021-05-10Handle cc_library shared/static only propertiesChris Parsons
Also handle whole_static_libs via a different attribute (whole_archive_deps), separating these dependencies from regular static deps. Test: Build //bionic/libdl with bazel in conjunction with bzl changes Change-Id: I45019b6127a0d2731592ec35537ca15e77001cc2
2021-04-30Support multilib properties in bp2buildChris Parsons
This combines properties among "multilib" and "arch" stanzas in selects generated by bp2build. With this fix, libc_gdtoa may be removed from the denylist. This change also refactors a portion of arch.go, specifically bp2build's arch mutator, adding a number of comments along the way, to hopefully make this code clearer for future readers. Test: mixed_libc.sh Change-Id: If2beea672957cfb1af6760406ba507181ec38f77
2021-04-27Make GetDirectDep implementation match commentLiz Kammer
The comment on the interface of GetDirectDep states if there are multiple deps with different tags, the first will be returned; however, the current behavior is to panic if there are multiple deps. The behavior now: * a single dep, return the module and tag * a single module with different tags: return module with first tag * multiple modules: panic * no module: return nil, nil Bug: 186488405 Test: ~/aosp/build/bazel/ci/bp2build.sh Test: m nothing Change-Id: Id1e7315e7874b4a683ad7357ed2793822315821f
2021-04-27bp2build: arch-specific exclude_srcs and srcs.Jingwen Chen
OS-specific exclude_srcs and srcs will be done in a follow-up, due to complexities from merging multiple select statements together. Test: TH Bug: 186153868 Change-Id: I01b881e9a5a7cd41b4a507f8be7e9e65eab37bdc
2021-04-27bp2build: remove header globs in generated srcs.Jingwen Chen
Not needed anymore for bp2build-incremental since https://android-review.googlesource.com/q/topic:no-include-check. Not needed for mixed builds either, since cc compile actions aren't sandboxed. Fixes: 186488830 Test: treehugger and go tests Change-Id: Ib5d4908dcce6bf910a653c457bb251d726e717d4
2021-04-22bp2build: refactor/standardize cc_* bp2build convertersJingwen Chen
This CL refactors the cc* bp2build converters to use the common attribute extractors in cc/bp2build.go. This also adds include_build_directory to be handled by the compiler attr extractor to generate recursive headers as inputs. This also turns include_dirs and local_include_dirs into the execroot-relative -I flags. e.g. if a module in bionic/libc has "private" in local_include_dirs, the "-Ibionic/libc/private" copt is generated for it. Fixes: 185139955 Test: TH Test: Forrest for mixed_clean-droid Change-Id: Ib67056482227e62068fbbea0455035bdf5d56319
2021-04-14Transform paths to headers in include dirs to take package boundaries into ↵Rupert Shuttleworth
account. This allows the following cc_library_static targets to build with bp2build: - libc_freebsd - libc_freebsd_large_stack - libc_openbsd_ndk - libc_gdtoa (* but still fails for mixed builds) - libc_aeabi - libc_static_dispatch - libc_dynamic_dispatch This also allows a number of other cc_library_static targets to progress further in their builds. Test: Added unit test Test: bp2build-sync.py write; bazel build //bionic/... Change-Id: I71742565c16594448a41a6428a5c993171ec4cb4
2021-04-09bp2build: codegen singleton lists on one line.Jingwen Chen
This CL refactors the bp2build code generator to pretty print lists with a single element on one line, instead of taking up three lines, which can make BUILD files unnecessarily long. A single line singleton list is also more commonly used in BUILD files. Test: TH Change-Id: Ic9e44741bbb070c8f45925466b9ccdd0608498b2
2021-04-09bp2build: cc_library converter for //bionic/libdl:libdl_androidJingwen Chen
This CL contains the converter for libdl_android, a cc_library that expands into a cc_shared_library and a regular cc_library. Test: TH Test: bp2build; bazel test //build/bazel/tests/... Change-Id: If70641a538211b0d6b2aac0e4d0d06912318304d
2021-04-08Be more explicit about headers in cc_library_static targets.Rupert Shuttleworth
Test: bp2build-sync.py write; bazel build //bionic/... Change-Id: I253b55f4d3cbe76805691b32e761016950871601
2021-04-02Remove libgcc toolchain libs for AndroidRyan Prichard
Remove Android-targeting gcc toolchain libraries -- libgcc, libgcc_stripped, libatomic, and libgcov. Also remove libunwind_llvm, which is replaced with a libunwind toolchain prebuilt. The __atomic_* library functions are now part of the compiler-rt builtins library: https://android-review.googlesource.com/c/toolchain/llvm_android/+/1625025 Bug: http://b/153025717 Test: treehugger Change-Id: I971d0a4a49f1aaeb3546e80b6d94208277a171ac
2021-03-25Add bp2build support for cc_library_static.Rupert Shuttleworth
Also refactor bp2build-related code for cc_library_headers. (Retry of previous CL after the presubmit failed to detect a merge conflict) Test: Added unit test. Test: bp2build-sync.py write; bazel build //bionic/... still works (but bp2build is disabled for most cc_library_static targets for other reasons) Change-Id: I2f4405c2fea305623bbc6daaaf62808b0c074216
2021-03-25Revert "Add bp2build support for cc_library_static."Jingwen Chen
Revert submission 1594391-bp2build-cc_library_static Reason for revert: Broke the build on aosp-master Reverted Changes: Ib16ccf31a:Add cc_library_static macro to help with bp2build ... I37c856be2:Add bp2build support for cc_library_static. Change-Id: Ie94d5bc6da81758cd4e0461c08a810a29643c971
2021-03-24Add bp2build support for cc_library_static.Rupert Shuttleworth
Also refactor bp2build-related code for cc_library_headers. Test: Added unit test. Test: bp2build-sync.py write; bazel build //bionic/... still works (but bp2build is disabled for most cc_library_static targets for other reasons) Change-Id: I37c856be20a47b154909338a22a7dba1ab55693f