Skip to content

Commit 0adcf46

Browse files
author
Jake Goldsborough
committed
detecting nodejs in configure
1 parent 79644ac commit 0adcf46

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

configure

+4
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,7 @@ valopt datadir "${CFG_PREFIX}/share" "install data"
634634
valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
635635
valopt llvm-root "" "set LLVM root"
636636
valopt python "" "set path to python"
637+
valopt nodejs "" "set path to nodejs"
637638
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
638639
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
639640
valopt android-cross-path "" "Android NDK standalone path (deprecated)"
@@ -749,6 +750,9 @@ if [ $(echo $python_version | grep -c '^Python 2\.7') -ne 1 ]; then
749750
err "Found $python_version, but Python 2.7 is required"
750751
fi
751752

753+
# Checking for node, but not required
754+
probe CFG_NODEJS nodejs node
755+
752756
# If we have no git directory then we are probably a tarball distribution
753757
# and shouldn't attempt to load submodules
754758
if [ ! -e ${CFG_SRC_DIR}.git ]

src/bootstrap/bootstrap.py

-9
Original file line numberDiff line numberDiff line change
@@ -236,15 +236,6 @@ def rustc(self):
236236
return config + '/bin/rustc' + self.exe_suffix()
237237
return os.path.join(self.bin_root(), "bin/rustc" + self.exe_suffix())
238238

239-
def nodejs(self):
240-
config = self.get_toml('nodejs')
241-
if config:
242-
return config
243-
if os.path.exists(os.path.join(self.bin_root(), "bin/nodejs")):
244-
return os.path.join(self.bin_root(), "bin/nodejs" + self.exe_suffix())
245-
elif os.path.exists(os.path.join(self.bin_root(), "bin/node")):
246-
return os.path.join(self.bin_root(), "bin/node" + self.exe_suffix())
247-
248239
def get_string(self, line):
249240
start = line.find('"')
250241
end = start + 1 + line[start+1:].find('"')

src/bootstrap/config.rs

-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ pub struct Config {
6767
pub target: Vec<String>,
6868
pub rustc: Option<PathBuf>,
6969
pub cargo: Option<PathBuf>,
70-
pub nodejs: Option<PathBuf>,
7170
pub local_rebuild: bool,
7271

7372
// libstd features
@@ -112,7 +111,6 @@ struct Build {
112111
host: Vec<String>,
113112
target: Vec<String>,
114113
cargo: Option<String>,
115-
nodejs: Option<String>,
116114
rustc: Option<String>,
117115
compiler_docs: Option<bool>,
118116
docs: Option<bool>,
@@ -217,7 +215,6 @@ impl Config {
217215
}
218216
config.rustc = build.rustc.map(PathBuf::from);
219217
config.cargo = build.cargo.map(PathBuf::from);
220-
config.nodejs = build.nodejs.map(PathBuf::from);
221218
set(&mut config.compiler_docs, build.compiler_docs);
222219
set(&mut config.docs, build.docs);
223220

0 commit comments

Comments
 (0)