Merge "Pass --no-default-features to cargo build"
This commit is contained in:
@@ -876,8 +876,11 @@ class Runner(object):
|
|||||||
cmd_tail = ' --target-dir ' + TARGET_TMP + ' >> cargo.out 2>&1'
|
cmd_tail = ' --target-dir ' + TARGET_TMP + ' >> cargo.out 2>&1'
|
||||||
for c in self.cargo:
|
for c in self.cargo:
|
||||||
features = ''
|
features = ''
|
||||||
if self.args.features and c != 'clean':
|
if c != 'clean':
|
||||||
features = ' --features ' + self.args.features
|
if self.args.features is not None:
|
||||||
|
features = ' --no-default-features'
|
||||||
|
if self.args.features:
|
||||||
|
features += ' --features ' + self.args.features
|
||||||
cmd = 'cargo -vv ' if self.args.vv else 'cargo -v '
|
cmd = 'cargo -vv ' if self.args.vv else 'cargo -v '
|
||||||
cmd += c + features + cmd_tail
|
cmd += c + features + cmd_tail
|
||||||
if self.args.rustflags and c != 'clean':
|
if self.args.rustflags and c != 'clean':
|
||||||
@@ -1076,7 +1079,9 @@ def parse_args():
|
|||||||
default=False,
|
default=False,
|
||||||
help='run cargo also for a default device target')
|
help='run cargo also for a default device target')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--features', type=str, help='passing features to cargo build')
|
'--features', type=str,
|
||||||
|
help=('pass features to cargo build, ' +
|
||||||
|
'empty string means no default features'))
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--onefile',
|
'--onefile',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
|
|||||||
Reference in New Issue
Block a user