summaryrefslogtreecommitdiffstats
path: root/build/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'build/scripts')
-rw-r--r--build/scripts/go_tool.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/build/scripts/go_tool.py b/build/scripts/go_tool.py
index 92a58925ebd..efc40126224 100644
--- a/build/scripts/go_tool.py
+++ b/build/scripts/go_tool.py
@@ -858,9 +858,26 @@ def do_link_test(args):
do_link_exe(test_args)
+def reorder(args):
+ for x in args:
+ if 'build-cow' in x:
+ bc = x
+ elif 'libyutil' in x:
+ yield bc
+ yield x
+ else:
+ yield x
+
+
if __name__ == '__main__':
args = pcf.get_args(sys.argv[1:])
+ if 'build-cow' in str(args) and 'libyutil' in str(args):
+ try:
+ args = list(reorder(args))
+ except UnboundLocalError:
+ pass
+
parser = argparse.ArgumentParser(prefix_chars='+')
parser.add_argument('++mode', choices=['dll', 'exe', 'lib', 'test'], required=True)
parser.add_argument('++buildmode', choices=['c-shared', 'exe', 'pie'])