]> Git Repo - qemu.git/commitdiff
docker: extend "cc" command to accept compiler
authorAlex Bennée <[email protected]>
Thu, 12 Apr 2018 16:18:12 +0000 (17:18 +0100)
committerAlex Bennée <[email protected]>
Wed, 20 Jun 2018 19:22:34 +0000 (20:22 +0100)
When calling our cross-compilation images we want to call something
other than the default cc.

Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
tests/docker/docker.py

index 42267bb94d447b17e74291d3032f7d4d622d8a96..db1e2537f55ad7843fc0b105b5c647483485d2c4 100755 (executable)
@@ -419,6 +419,8 @@ class CcCommand(SubCommand):
     def args(self, parser):
         parser.add_argument("--image", "-i", required=True,
                             help="The docker image in which to run cc")
+        parser.add_argument("--cc", default="cc",
+                            help="The compiler executable to call")
         parser.add_argument("--source-path", "-s", nargs="*", dest="paths",
                             help="""Extra paths to (ro) mount into container for
                             reading sources""")
@@ -432,7 +434,7 @@ class CcCommand(SubCommand):
         if args.paths:
             for p in args.paths:
                 cmd += ["-v", "%s:%s:ro,z" % (p, p)]
-        cmd += [args.image, "cc"]
+        cmd += [args.image, args.cc]
         cmd += argv
         return Docker().command("run", cmd, args.quiet)
 
This page took 0.027591 seconds and 4 git commands to generate.