summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDarryl Green <darryl.green@arm.com>2019-05-09 13:03:05 +0100
committerDarryl Green <darryl.green@arm.com>2019-05-09 13:25:26 +0100
commitfbf3c8ac23ef8b23d88775e226cb5b7030b5df53 (patch)
tree088d69524513fcf415953d84b99907d6c497eea5 /scripts
parent9fb12bd1a20245038e07212be3017c08ed8fdc00 (diff)
Only use submodule if present
Enabling the USE_CRYPTO_SUBMODULE option causes problems if the crypto submodule isn't present. For example, when building mbed-crypto as a submodule, it should use error.c from the parent project if USE_CRYPTO_SUBMODULE is set. However if the parent project isn't present, then the build will fail. Only enable it if the submodule actually exists.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/abi_check.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/abi_check.py b/scripts/abi_check.py
index f837f7a7..30c3fe51 100755
--- a/scripts/abi_check.py
+++ b/scripts/abi_check.py
@@ -148,7 +148,8 @@ class AbiChecker(object):
my_environment = os.environ.copy()
my_environment["CFLAGS"] = "-g -Og"
my_environment["SHARED"] = "1"
- my_environment["USE_CRYPTO_SUBMODULE"] = "1"
+ if os.path.exists(os.path.join(git_worktree_path, "crypto")):
+ my_environment["USE_CRYPTO_SUBMODULE"] = "1"
make_output = subprocess.check_output(
[self.make_command, "lib"],
env=my_environment,