diff options
author | Kelvin Zhang <zhangkelvin@google.com> | 2021-08-19 23:59:54 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-08-19 23:59:54 +0000 |
commit | 344d5f48329f23be2b203600d8379a0c52c65ee1 (patch) | |
tree | f56e568a43797af982f43298c0bf738a0c5b60a6 /aosp/preprocess.py | |
parent | 01480cf7fb9f1bfdd1d637a512fe50f810e452ae (diff) | |
parent | d8066daf2c4d0be187e17cbebca3383d49a19e61 (diff) | |
download | zucchini-344d5f48329f23be2b203600d8379a0c52c65ee1.tar.gz |
Get zucchini to compile w/o code transformation hack am: ddcf1d921a am: 56407f22f0 am: 1c65532581 am: d8066daf2c
Original change: https://android-review.googlesource.com/c/platform/external/zucchini/+/1802898
Change-Id: I4c472132589f3673be5dfdacf64be7388894ae1c
Diffstat (limited to 'aosp/preprocess.py')
-rwxr-xr-x | aosp/preprocess.py | 31 |
1 files changed, 0 insertions, 31 deletions
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)) |