aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/build.py
diff options
context:
space:
mode:
Diffstat (limited to 'compiler_wrapper/build.py')
-rwxr-xr-xcompiler_wrapper/build.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler_wrapper/build.py b/compiler_wrapper/build.py
index 4257abfc..037b940f 100755
--- a/compiler_wrapper/build.py
+++ b/compiler_wrapper/build.py
@@ -39,10 +39,16 @@ def calc_go_args(args, version):
'-X',
'main.Version=' + version,
]
+
+ # If the wrapper is intended for Chrome OS, we need to use libc's exec.
+ extra_args = []
+ if 'cros' in args.config:
+ extra_args = ['-tags', 'libc_exec']
+
return [
'go', 'build', '-o',
os.path.abspath(args.output_file), '-ldflags', ' '.join(ldFlags)
- ]
+ ] + extra_args
def read_version(build_dir):