Skip to content

Commit fc937aa

Browse files
committed
Use full path to link to libv8.a and libudns.a
Previously was linking just by doing -lv8 or -ludns which could confuse the build when a system libv8 or libudns was installed.
1 parent 122e74b commit fc937aa

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

wscript

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -172,19 +172,16 @@ def build_udns(bld):
172172
)
173173

174174
bld.env["CPPPATH_UDNS"] = "deps/udns"
175-
bld.env["STATICLIB_UDNS"] = "udns"
176-
177-
bld.env_of_name('default')["STATICLIB_UDNS"] = "udns"
178-
bld.env_of_name('default')["LIBPATH_UDNS"] = default_dir
175+
t = join(bld.srcnode.abspath(bld.env_of_name("default")), default.target)
176+
bld.env_of_name('default')["LINKFLAGS_UDNS"] = [t]
179177

180178
if bld.env["USE_DEBUG"]:
181179
debug_build_dir = bld.srcnode.abspath(bld.env_of_name("debug"))
182180
debug_dir = join(debug_build_dir, "deps/udns")
183181
debug = default.clone("debug")
184182
debug.rule = rule % debug_dir
185-
#debug.target = join(debug_dir, static_lib)
186-
bld.env_of_name('debug')["STATICLIB_UDNS"] = "udns"
187-
bld.env_of_name('debug')["LIBPATH_UDNS"] = debug_dir
183+
t = join(bld.srcnode.abspath(bld.env_of_name("debug")), debug.target)
184+
bld.env_of_name('debug')["LINKFLAGS_UDNS"] = [t]
188185
bld.install_files('${PREFIX}/include/node/', 'deps/udns/udns.h')
189186

190187
def v8_cmd(bld, variant):
@@ -230,19 +227,17 @@ def build_v8(bld):
230227
)
231228
v8.uselib = "EXECINFO"
232229
bld.env["CPPPATH_V8"] = "deps/v8/include"
233-
bld.env_of_name('default')["STATICLIB_V8"] = "v8"
234-
bld.env_of_name('default')["LINKFLAGS_V8"] = ["-pthread"]
235-
bld.env_of_name('default')["LIBPATH_V8"] = bld.srcnode.abspath(bld.env_of_name("default"))
230+
t = join(bld.srcnode.abspath(bld.env_of_name("default")), v8.target)
231+
bld.env_of_name('default')["LINKFLAGS_V8"] = ["-pthread", t]
236232

237233
### v8 debug
238234
if bld.env["USE_DEBUG"]:
239235
v8_debug = v8.clone("debug")
240236
v8_debug.rule = v8_cmd(bld, "debug")
241237
v8_debug.target = bld.env["staticlib_PATTERN"] % "v8_g"
242238
v8_debug.uselib = "EXECINFO"
243-
bld.env_of_name('debug')["STATICLIB_V8"] = "v8_g"
244-
bld.env_of_name('debug')["LINKFLAGS_V8"] = ["-pthread"]
245-
bld.env_of_name('debug')["LIBPATH_V8"] = bld.srcnode.abspath(bld.env_of_name("debug"))
239+
t = join(bld.srcnode.abspath(bld.env_of_name("debug")), v8_debug.target)
240+
bld.env_of_name('debug')["LINKFLAGS_V8"] = ["-pthread", t]
246241

247242
bld.install_files('${PREFIX}/include/node/', 'deps/v8/include/*.h')
248243

0 commit comments

Comments
 (0)