Write relative paths to source_file fields in sdump
This commit adds --root-dir as a parameter to the ABI tools. It defaults to current working directory. The source_file fields in the dump files are relative to the root dir, so the file content doesn't depend on the absolute path to Android source tree. Test: ./header-checker-unittests Test: ./test.py Bug: 154177636 Change-Id: Ia07d0d3b913c921e9e91ea01c4f1e9c3c62c6ea9
This commit is contained in:
@@ -140,7 +140,7 @@ def _run_header_abi_dumper_on_file(input_path, output_path,
|
||||
# The export include dirs imply local include dirs.
|
||||
for dir in export_include_dirs:
|
||||
cmd += ['-I', dir]
|
||||
subprocess.check_call(cmd)
|
||||
subprocess.check_call(cmd, cwd=AOSP_DIR)
|
||||
|
||||
|
||||
def run_header_abi_linker(output_path, inputs, version_script, api, arch,
|
||||
@@ -154,7 +154,7 @@ def run_header_abi_linker(output_path, inputs, version_script, api, arch,
|
||||
if '-output-format' not in flags:
|
||||
cmd += ['-output-format', DEFAULT_FORMAT]
|
||||
cmd += inputs
|
||||
subprocess.check_call(cmd)
|
||||
subprocess.check_call(cmd, cwd=AOSP_DIR)
|
||||
return read_output_content(output_path, input_dir)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user