diff --git a/build/autoconf/compiler-opts.m4 b/build/autoconf/compiler-opts.m4 index 1e849b1cc79e..5b2d4a2d9e9f 100644 --- a/build/autoconf/compiler-opts.m4 +++ b/build/autoconf/compiler-opts.m4 @@ -25,7 +25,6 @@ case "$target" in if test -z "$CXX"; then CXX=cl; fi if test -z "$CPP"; then CPP="$CC -E -nologo"; fi if test -z "$CXXCPP"; then CXXCPP="$CXX -TP -E -nologo"; ac_cv_prog_CXXCPP="$CXXCPP"; fi - if test -z "$LD"; then LD=link; fi if test -z "$AS"; then case "${target_cpu}" in i*86) diff --git a/build/moz.configure/windows.configure b/build/moz.configure/windows.configure index 2b1470e7c109..63933670153a 100644 --- a/build/moz.configure/windows.configure +++ b/build/moz.configure/windows.configure @@ -379,6 +379,16 @@ def valid_mt(path): set_config('MSMANIFEST_TOOL', depends(valid_mt)(lambda x: bool(x))) +# Ultimately, this will move to toolchain.configure and be turned into a +# cross-platform check. +option(env='LD', nargs=1, help='Path to the linker') + +link = check_prog('LINK', depends_win()(lambda: ('link.exe',)), input='LD', + paths=vc_compiler_path) + +add_old_configure_assignment('LD', depends_win(link)(lambda x: x)) + + # Normally, we'd just have CC, etc. set to absolute paths, but the build system # doesn't currently handle properly the case where the paths contain spaces. # Additionally, there's the issue described in toolchain.configure, in