diff options
author | Nick Desaulniers <ndesaulniers@google.com> | 2024-01-30 09:53:50 -0800 |
---|---|---|
committer | Nick Desaulniers <ndesaulniers@google.com> | 2024-01-31 13:40:58 -0800 |
commit | 63f3a313c62becaa478c977653aca09666d82dd8 (patch) | |
tree | 289ea09097240610eb57bd289b6c2f223cff3956 | |
parent | bff5f3d7fb1ade02c55ee715a8fb6ee8d901516e (diff) | |
download | llvm-libc-upstream.tar.gz |
llvm-libc: Add Android specific files after initial importupstream
Third-Party Import of: https://github.com/llvm/llvm-project.git
Request Document: go/android3p
For CL Reviewers: go/android3p#cl-review
For Build Team: go/ab-third-party-imports
Test: mm && llvm-nm $(find $OUT -name llvmlibc.a) | grep -q bsearch
Bug: 321313756
Change-Id: Idb132fa258c008fe52965af46e5eed21c51bca54
-rw-r--r-- | Android.bp | 42 | ||||
-rw-r--r-- | METADATA | 19 | ||||
-rw-r--r-- | MODULE_LICENSE_APACHE2 | 0 | ||||
-rw-r--r-- | OWNERS | 1 | ||||
-rw-r--r-- | copy.bara.sky | 57 |
5 files changed, 119 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp new file mode 100644 index 000000000000..2c8975115713 --- /dev/null +++ b/Android.bp @@ -0,0 +1,42 @@ +// https://ci.android.com/builds/latest/branches/aosp-build-tools/targets/linux/view/soong_build.html + +cc_library_static { + name: "llvmlibc", + visibility: [ + "//bionic/libc", + ], + include_dirs: [ + "external/llvm-libc", + ], + srcs: [ + "src/stdlib/bsearch.cpp", + ], + cflags: [ + // Necessary for non-namespaced exports. + "-DLIBC_COPT_PUBLIC_PACKAGING", + // Necessary to build. + "-DLIBC_NAMESPACE=llvmlibc", + ], + // No C++ runtime. + stl: "none", + // No crt_begin and crt_end. + nocrt: true, + // Needs to be unset from the default value in order to avoid creating a + // cyclic dependency between llvm-libc and bionic's libc. + system_shared_libs: [], + + // Bionic's libc's dependencies must have these set, or the build will fail + // due to missing a "ramdisk", "vendor_ramdisk", and "recovery" variants. + native_bridge_supported: true, + ramdisk_available: true, + recovery_available: true, + vendor_ramdisk_available: true, + + // Bionic's dependencies must also set this. + apex_available: [ + "com.android.runtime", + ], + + // When llvm-libc includes <stdlib.h>, use bionic's headers for these. + header_libs: ["libc_headers"], +} diff --git a/METADATA b/METADATA new file mode 100644 index 000000000000..feef99606a48 --- /dev/null +++ b/METADATA @@ -0,0 +1,19 @@ +name: "llvmlibc" +description: "LLVM's libc" +third_party { + url { + type: HOMEPAGE + value: "https://libc.llvm.org/" + } + url { + type: GIT + value: "https://github.com/llvm/llvm-project.git" + } + version: "30aa9fb4c1da33892a38f952fbdf6e7e45e5953a" + last_upgrade_date { + year: 2024 + month: 1 + day: 31 + } + license_type: NOTICE +} diff --git a/MODULE_LICENSE_APACHE2 b/MODULE_LICENSE_APACHE2 new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/MODULE_LICENSE_APACHE2 diff --git a/OWNERS b/OWNERS new file mode 100644 index 000000000000..2e8f086e19a6 --- /dev/null +++ b/OWNERS @@ -0,0 +1 @@ +include platform/system/core:main:/janitors/OWNERS diff --git a/copy.bara.sky b/copy.bara.sky new file mode 100644 index 000000000000..cacf3268f271 --- /dev/null +++ b/copy.bara.sky @@ -0,0 +1,57 @@ +core.workflow( + name = "default", + origin = git.origin( + url = "https://github.com/llvm/llvm-project.git", + ref = "main", + ), + origin_files = glob( + [ + "libc/**", + "libc/LICENSE.TXT", + ], + # Exclude copying these files from upstream. Keep sorted. + exclude = [ + "**/*.h.def", + "**/*.inc", + "**/*.md", + "**/*.txt", + "**/.clang-tidy", + "**/CMakeLists.txt", + "**/README.txt", + "libc/.gitignore", + "libc/AOR_v20.02/**", + "libc/benchmarks/**", + "libc/cmake/**", + "libc/config/**", + "libc/docs/**", + "libc/examples/**", + "libc/fuzzing/**", + "libc/spec/**", + "libc/startup/**", + "libc/utils/**", + ], + ), + destination = git.gerrit_destination( + url = "sso://googleplex-android/platform/external/llvm-libc", + #url = "https://googleplex-android.googlesource.com/platform/external/llvm-libc", + #url = "https://android.googlesource.com/platform/external/llvm-libc", + fetch = "master", + ), + destination_files = glob( + [ + "**.cpp", + "**.h", + "LICENSE", + ], + ), + authoring = authoring.pass_thru( + "LLVM libc <llvm-libc@google.com>" + ), + # mode = 'ITERATIVE', + transformations = [ + core.move("libc/LICENSE.TXT", "LICENSE"), + core.move("libc/include", "include"), + core.move("libc/src", "src"), + core.move("libc/test", "test"), + ], +) |