Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes redirect-cc.py for 64-bit Android and MacOS ARM builds. #7744

Merged
merged 1 commit into from
Jan 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions script/redirect-cc.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,16 @@ def replace_cc_arg(args):
# Filter away out and out_x86
# Maybe this dir can be queried from env variable instead of hardcoding
OUT_DIR_NAMES = ['out', 'out_x86']
rel_path_parts = rel_path.split(os.sep, 3)
rel_path_parts = rel_path.split(os.sep, 4)
if rel_path_parts[0] in OUT_DIR_NAMES:
if rel_path_parts[2] == 'gen':
rel_path = rel_path_parts[3]
rel_path = os.path.join(rel_path_parts[3], rel_path_parts[4])
elif rel_path_parts[3] == 'gen':
# In addition to the regular gen location above, 64-bit builds may
# have the directory stucture like out/<BUILD>/android_clang_arm or
# out/<BUILD>/android_clang_x86 on Android, or
# out/<BUILD>/clang_x64_v8_arm64 on MacOS
rel_path = rel_path_parts[4]
else:
# Don't even try to substitute path for other auto-generated cc
return
Expand Down