diff options
author | Kelvin Zhang <zhangkelvin@google.com> | 2021-08-19 23:42:14 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-08-19 23:42:14 +0000 |
commit | d8066daf2c4d0be187e17cbebca3383d49a19e61 (patch) | |
tree | f56e568a43797af982f43298c0bf738a0c5b60a6 | |
parent | e2c5010bc91420e95974d60f931d5e7769daab29 (diff) | |
parent | 1c6553258107bea66f356b47baa029c74b5125d9 (diff) | |
download | zucchini-d8066daf2c4d0be187e17cbebca3383d49a19e61.tar.gz |
Get zucchini to compile w/o code transformation hack am: ddcf1d921a am: 56407f22f0 am: 1c65532581
Original change: https://android-review.googlesource.com/c/platform/external/zucchini/+/1802898
Change-Id: I47e70d3d437d55e42f492ea73c897690b870855c
-rw-r--r-- | Android.bp | 24 | ||||
l--------- | aosp/include/components/zucchini | 1 | ||||
-rw-r--r-- | aosp/include/third_party/abseil-cpp/absl/types/optional.h (renamed from aosp/include/absl/types/optional.h) | 0 | ||||
-rwxr-xr-x | aosp/preprocess.py | 31 | ||||
-rw-r--r-- | buildflags.h (renamed from aosp/include/buildflags.h) | 0 |
5 files changed, 2 insertions, 54 deletions
@@ -98,26 +98,6 @@ filegroup { ], } -// The aosp versions of sources are preprocesseed with include -// re-written in an AOSP compatible way. Some headers, such as -// absl, are simply redirected to STL equivalent. -gensrcs { - name: "libzucchini_aosp_srcs", - cmd: "$(location aosp/preprocess.py) $(in) $(out)", - tool_files: ["aosp/preprocess.py"], - srcs: [":libzucchini_srcs"], - output_extension: "cc", -} - -gensrcs { - name: "libzucchini_aosp_headers", - cmd: "$(location aosp/preprocess.py) $(in) $(out)", - tool_files: ["aosp/preprocess.py"], - srcs: [":libzucchini_headers"], - export_include_dirs: ["."], - output_extension: "h", -} - cc_library { name: "libzucchini", @@ -126,10 +106,8 @@ cc_library { // instead of loacl ones. As the generated headers contain // incorrect include paths include_build_directory: false, - srcs: [":libzucchini_aosp_srcs"], - generated_headers: ["libzucchini_aosp_headers"], + srcs: [":libzucchini_srcs"], local_include_dirs: ["aosp/include"], - export_generated_headers: ["libzucchini_aosp_headers"], export_include_dirs: ["aosp/include"], static_libs: [ "libchrome", diff --git a/aosp/include/components/zucchini b/aosp/include/components/zucchini new file mode 120000 index 0000000..1b20c9f --- /dev/null +++ b/aosp/include/components/zucchini @@ -0,0 +1 @@ +../../../
\ No newline at end of file diff --git a/aosp/include/absl/types/optional.h b/aosp/include/third_party/abseil-cpp/absl/types/optional.h index 3321c72..3321c72 100644 --- a/aosp/include/absl/types/optional.h +++ b/aosp/include/third_party/abseil-cpp/absl/types/optional.h diff --git a/aosp/preprocess.py b/aosp/preprocess.py deleted file mode 100755 index 7a31ffc..0000000 --- a/aosp/preprocess.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python3 - -# ChromeOs version of zucchini expects to find its headers -# in a specifc path. In android the include paths are slightly -# different. Since we can't change upstream source code, we -# use this script to preprocess all files(.cc and ,h) and -# re-write all include paths - - -def main(argv): - if len(argv) != 3: - print("Usage:", argv[0], "<input path> <output path>") - return 1 - input_path = argv[1] - output_path = argv[2] - with open(input_path, "r") as infp, open(output_path, "w") as outfp: - for line in infp.readlines(): - line = line.replace('#include "components/zucchini/', - '#include "') - line = line.replace('#include <components/zucchini/', - '#include <') - line = line.replace('#include "third_party/abseil-cpp/', - '#include "') - line = line.replace('#include <third_party/abseil-cpp/', - '#include <') - outfp.write(line) - - -if __name__ == '__main__': - import sys - sys.exit(main(sys.argv)) diff --git a/aosp/include/buildflags.h b/buildflags.h index 2b63e59..2b63e59 100644 --- a/aosp/include/buildflags.h +++ b/buildflags.h |