detecting nodejs in configure
This commit is contained in:
parent
79644ac3c4
commit
0adcf46cdf
3 changed files with 4 additions and 12 deletions
|
|
@ -236,15 +236,6 @@ class RustBuild:
|
|||
return config + '/bin/rustc' + self.exe_suffix()
|
||||
return os.path.join(self.bin_root(), "bin/rustc" + self.exe_suffix())
|
||||
|
||||
def nodejs(self):
|
||||
config = self.get_toml('nodejs')
|
||||
if config:
|
||||
return config
|
||||
if os.path.exists(os.path.join(self.bin_root(), "bin/nodejs")):
|
||||
return os.path.join(self.bin_root(), "bin/nodejs" + self.exe_suffix())
|
||||
elif os.path.exists(os.path.join(self.bin_root(), "bin/node")):
|
||||
return os.path.join(self.bin_root(), "bin/node" + self.exe_suffix())
|
||||
|
||||
def get_string(self, line):
|
||||
start = line.find('"')
|
||||
end = start + 1 + line[start+1:].find('"')
|
||||
|
|
|
|||
|
|
@ -67,7 +67,6 @@ pub struct Config {
|
|||
pub target: Vec<String>,
|
||||
pub rustc: Option<PathBuf>,
|
||||
pub cargo: Option<PathBuf>,
|
||||
pub nodejs: Option<PathBuf>,
|
||||
pub local_rebuild: bool,
|
||||
|
||||
// libstd features
|
||||
|
|
@ -112,7 +111,6 @@ struct Build {
|
|||
host: Vec<String>,
|
||||
target: Vec<String>,
|
||||
cargo: Option<String>,
|
||||
nodejs: Option<String>,
|
||||
rustc: Option<String>,
|
||||
compiler_docs: Option<bool>,
|
||||
docs: Option<bool>,
|
||||
|
|
@ -217,7 +215,6 @@ impl Config {
|
|||
}
|
||||
config.rustc = build.rustc.map(PathBuf::from);
|
||||
config.cargo = build.cargo.map(PathBuf::from);
|
||||
config.nodejs = build.nodejs.map(PathBuf::from);
|
||||
set(&mut config.compiler_docs, build.compiler_docs);
|
||||
set(&mut config.docs, build.docs);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue