gn2bp: Move response file to gn_utils
* This is a GN-specific flag that should live in gn_utils as it might be used in the future when converting to Bazel. Test: update_results.sh Change-Id: If870f757cf3ee57a00c571947a7ffea18a7db55d
This commit is contained in:
@@ -108,7 +108,7 @@ buildtools_protobuf_src = '//buildtools/protobuf/src'
|
|||||||
# Location of the protobuf src dir in the Android source tree.
|
# Location of the protobuf src dir in the Android source tree.
|
||||||
android_protobuf_src = 'external/protobuf/src'
|
android_protobuf_src = 'external/protobuf/src'
|
||||||
|
|
||||||
response_file = '{{response_file_name}}'
|
|
||||||
|
|
||||||
# Compiler flags which are passed through to the blueprint.
|
# Compiler flags which are passed through to the blueprint.
|
||||||
cflag_allowlist = [
|
cflag_allowlist = [
|
||||||
@@ -737,11 +737,11 @@ class BaseActionSanitizer():
|
|||||||
# Handle passing parameters via response file by piping them into the script
|
# Handle passing parameters via response file by piping them into the script
|
||||||
# and reading them from /dev/stdin.
|
# and reading them from /dev/stdin.
|
||||||
|
|
||||||
self.use_response_file = response_file in self.target.args
|
self.use_response_file = gn_utils.RESPONSE_FILE in self.target.args
|
||||||
if self.use_response_file:
|
if self.use_response_file:
|
||||||
# Replace {{response_file_contents}} with /dev/stdin
|
# Replace {{response_file_contents}} with /dev/stdin
|
||||||
self.target.args = ['/dev/stdin' if it == response_file else it for it in
|
self.target.args = ['/dev/stdin' if it == gn_utils.RESPONSE_FILE else it
|
||||||
self.target.args]
|
for it in self.target.args]
|
||||||
|
|
||||||
def _sanitize_outputs(self):
|
def _sanitize_outputs(self):
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ ODR_VIOLATION_IGNORE_TARGETS = {
|
|||||||
ARCH_REGEX = r'(android_x86_64|android_x86|android_arm|android_arm64|host)'
|
ARCH_REGEX = r'(android_x86_64|android_x86|android_arm|android_arm64|host)'
|
||||||
DEX_REGEX = '.*__dex__%s$' % ARCH_REGEX
|
DEX_REGEX = '.*__dex__%s$' % ARCH_REGEX
|
||||||
COMPILE_JAVA_REGEX = '.*__compile_java__%s$' % ARCH_REGEX
|
COMPILE_JAVA_REGEX = '.*__compile_java__%s$' % ARCH_REGEX
|
||||||
|
RESPONSE_FILE = '{{response_file_name}}'
|
||||||
|
|
||||||
def repo_root():
|
def repo_root():
|
||||||
"""Returns an absolute path to the repository root."""
|
"""Returns an absolute path to the repository root."""
|
||||||
return os.path.join(
|
return os.path.join(
|
||||||
|
|||||||
Reference in New Issue
Block a user