Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
build: make: add tool probe for cargo
  • Loading branch information
ePirat committed Nov 21, 2020
commit 94cade78f646ecf19a2807a670aecc72faf2c209
5 changes: 5 additions & 0 deletions make/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1591,6 +1591,7 @@ def infof( self, format, *args ):
arch_gcc = None
cross = None
xcode_opts = { 'disabled': False, 'config': None }
rav1e_enabled = False
for i in range(len(sys.argv)):
if re.compile( '^--arch=(.+)$' ).match( sys.argv[i] ):
arch_gcc = sys.argv[i][7:]
Expand Down Expand Up @@ -1619,6 +1620,9 @@ def infof( self, format, *args ):
elif re.compile( '^--disable-xcode$' ).match( sys.argv[i] ):
xcode_opts['disabled'] = True
continue
elif re.compile( '^--enable-rav1e$' ).match( sys.argv[i] ):
rav1e_enabled = True
continue

## create tools in a scope
class Tools:
Expand Down Expand Up @@ -1653,6 +1657,7 @@ class Tools:
meson = ToolProbe( 'MESON.exe', 'meson', 'meson', abort=True, minversion=[0,47,0] )
nasm = ToolProbe( 'NASM.exe', 'asm', 'nasm', abort=True, minversion=[2,13,0] )
ninja = ToolProbe( 'NINJA.exe', 'ninja', 'ninja-build', 'ninja', abort=True )
cargo = ToolProbe( 'CARGO.exe', 'cargo', 'cargo', abort=rav1e_enabled )

xcodebuild = ToolProbe( 'XCODEBUILD.exe', 'xcodebuild', 'xcodebuild', abort=(True if (not xcode_opts['disabled'] and (build_tuple.match('*-*-darwin*') and cross is None)) else False), versionopt='-version', minversion=[10,3,0] )

Expand Down