From 4580f3dac85a033028ff789fab2b4c46a9d8771a Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 31 Mar 2019 22:26:09 +0800 Subject: [PATCH] test/lit: support overriding libartiq_support.so --- artiq/test/lit/lit.cfg | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/artiq/test/lit/lit.cfg b/artiq/test/lit/lit.cfg index daa4c1723..8e03ad9f7 100644 --- a/artiq/test/lit/lit.cfg +++ b/artiq/test/lit/lit.cfg @@ -27,13 +27,15 @@ not_ = "{} {}".format(sys.executable, os.path.join(root, "lit", "not.py")) config.substitutions.append( ("%not", not_) ) if os.name == "posix": - support_build = os.path.join(root, "libartiq_support") - if subprocess.call(["rustc", os.path.join(support_build, "lib.rs"), - "--out-dir", support_build, - "-Cpanic=unwind", "-g"]) != 0: - lit_config.fatal("Unable to build JIT support library") + support_lib = os.getenv("LIBARTIQ_SUPPORT"): + if not support_lib: + support_build = os.path.join(root, "libartiq_support") + if subprocess.call(["rustc", os.path.join(support_build, "lib.rs"), + "--out-dir", support_build, + "-Cpanic=unwind", "-g"]) != 0: + lit_config.fatal("Unable to build JIT support library") - support_lib = os.path.join(support_build, "libartiq_support.so") + support_lib = os.path.join(support_build, "libartiq_support.so") config.environment["LIBARTIQ_SUPPORT"] = support_lib config.environment["RUST_BACKTRACE"] = "1"