Add an option to build against no SDKs (#1201)

This commit is contained in:
Asher Baker
2020-03-04 21:52:07 +00:00
committed by GitHub
parent 6a307bfcee
commit bff8585411
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -143,6 +143,7 @@ class SMConfig(object):
def detectSDKs(self):
sdk_list = builder.options.sdks.split(',')
use_none = sdk_list[0] == 'none'
use_all = sdk_list[0] == 'all'
use_present = sdk_list[0] == 'present'
@@ -161,7 +162,7 @@ class SMConfig(object):
sdk.path = Normalize(sdk_path)
self.sdks[sdk_name] = sdk
if len(self.sdks) < 1 and len(sdk_list):
if len(self.sdks) < 1 and len(sdk_list) and not use_none:
raise Exception('No SDKs were found that build on {0}-{1}, nothing to do.'.format(
builder.target.platform, builder.target.arch))