41 lines
2.0 KiB
Diff
41 lines
2.0 KiB
Diff
--- rustc-1.70.0-src/src/bootstrap/configure.py.orig 2023-05-29 19:14:10.000000000 +0200
|
|
+++ rustc-1.70.0-src/src/bootstrap/configure.py 2023-05-31 23:58:14.183420700 +0200
|
|
@@ -297,6 +297,11 @@
|
|
arr[part] = {}
|
|
arr = arr[part]
|
|
|
|
+def exe_suffix():
|
|
+ """Return a suffix for executables"""
|
|
+ if sys.platform == 'win32':
|
|
+ return '.exe'
|
|
+ return ''
|
|
|
|
def apply_args(known_args, option_checking, config):
|
|
for key in known_args:
|
|
@@ -332,18 +337,18 @@
|
|
set('llvm.ccache', 'sccache', config)
|
|
elif option.name == 'local-rust':
|
|
for path in os.environ['PATH'].split(os.pathsep):
|
|
- if os.path.exists(path + '/rustc'):
|
|
- set('build.rustc', path + '/rustc', config)
|
|
+ if os.path.exists(path + '/rustc' + exe_suffix()):
|
|
+ set('build.rustc', path + '/rustc' + exe_suffix(), config)
|
|
break
|
|
for path in os.environ['PATH'].split(os.pathsep):
|
|
- if os.path.exists(path + '/cargo'):
|
|
- set('build.cargo', path + '/cargo', config)
|
|
+ if os.path.exists(path + '/cargo' + exe_suffix()):
|
|
+ set('build.cargo', path + '/cargo' + exe_suffix(), config)
|
|
break
|
|
elif option.name == 'local-rust-root':
|
|
- set('build.rustc', value + '/bin/rustc', config)
|
|
- set('build.cargo', value + '/bin/cargo', config)
|
|
+ set('build.rustc', value + '/bin/rustc' + exe_suffix(), config)
|
|
+ set('build.cargo', value + '/bin/cargo' + exe_suffix(), config)
|
|
elif option.name == 'llvm-root':
|
|
- set('target.{}.llvm-config'.format(build_triple), value + '/bin/llvm-config', config)
|
|
+ set('target.{}.llvm-config'.format(build_triple), value + '/bin/llvm-config' + exe_suffix(), config)
|
|
elif option.name == 'llvm-config':
|
|
set('target.{}.llvm-config'.format(build_triple), value, config)
|
|
elif option.name == 'llvm-filecheck':
|