Bug 1480005 - Look for llvm-ar for AR when compiling with clang. r=firefox-build-system-reviewers,nalexander

And stop setting AR to llvm-ar in mozconfigs.

Differential Revision: https://phabricator.services.mozilla.com/D101679
This commit is contained in:
Mike Hommey 2021-01-14 03:41:39 +00:00
Родитель a160c92089
Коммит 647145eef9
13 изменённых файлов: 14 добавлений и 13 удалений

Просмотреть файл

@ -46,7 +46,6 @@ CXX="$MOZ_FETCHES_DIR/clang/bin/i686-w64-mingw32-clang++"
ac_add_options --with-clang-path="$CC"
ac_add_options --with-libclang-path="$MOZ_FETCHES_DIR/clang/lib"
CXXFLAGS="-fms-extensions"
AR=llvm-ar
RANLIB=llvm-ranlib
CFLAGS="$CFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"
CXXFLAGS="$CXXFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"

Просмотреть файл

@ -46,7 +46,6 @@ CXX="$MOZ_FETCHES_DIR/clang/bin/x86_64-w64-mingw32-clang++"
ac_add_options --with-clang-path="$CC"
ac_add_options --with-libclang-path="$MOZ_FETCHES_DIR/clang/lib"
CXXFLAGS="-fms-extensions"
AR=llvm-ar
RANLIB=llvm-ranlib
CFLAGS="$CFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"
CXXFLAGS="$CXXFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"

Просмотреть файл

@ -2872,8 +2872,21 @@ def ar_config(toolchain_prefix, c_compiler):
names=("llvm-lib",),
flags=("-llvmlibthin", "-out:$@"),
)
names = tuple("%s%s" % (p, "ar") for p in (toolchain_prefix or ()) + ("",))
if c_compiler.type == "clang":
# Get the llvm-ar path as per the output from clang --print-prog-name=llvm-ar
# so that we directly get the one under the clang directory, rather than one
# that might be in /usr/bin and that might point to one from a different version
# of clang.
out = check_cmd_output(
c_compiler.compiler, "--print-prog-name=llvm-ar", onerror=lambda: None
)
llvm_ar = out.rstrip() if out else "llvm-ar"
names = (llvm_ar,) + names
return namespace(
names=tuple("%s%s" % (p, "ar") for p in (toolchain_prefix or ()) + ("",)),
names=names,
flags=("crs", "$@"),
)

Просмотреть файл

@ -33,7 +33,6 @@ unset MOZ_LTO
unset MOZ_STDCXX_COMPAT
unset MOZ_NO_PIE_COMPAT
unset AR
unset NM
unset RANLIB
unset NASM

Просмотреть файл

@ -36,7 +36,6 @@ else
ac_add_options --with-pgo-jarlog=${MOZ_FETCHES_DIR}/en-US.log
ac_add_options --with-pgo-profile-path=${MOZ_FETCHES_DIR}/merged.profdata
export LLVM_PROFDATA="$MOZ_FETCHES_DIR/clang/bin/llvm-profdata"
export AR="$MOZ_FETCHES_DIR/clang/bin/llvm-ar"
export NM="$MOZ_FETCHES_DIR/clang/bin/llvm-nm"
export RANLIB="$MOZ_FETCHES_DIR/clang/bin/llvm-ranlib"
fi

Просмотреть файл

@ -8,7 +8,6 @@ ac_add_options --with-branding=mobile/android/branding/beta
export MOZILLA_OFFICIAL=1
export AR="$MOZ_FETCHES_DIR/clang/bin/llvm-ar"
export NM="$MOZ_FETCHES_DIR/clang/bin/llvm-nm"
export RANLIB="$MOZ_FETCHES_DIR/clang/bin/llvm-ranlib"

Просмотреть файл

@ -10,7 +10,6 @@ export FENNEC_NIGHTLY=1
export MOZILLA_OFFICIAL=1
export AR="$MOZ_FETCHES_DIR/clang/bin/llvm-ar"
export NM="$MOZ_FETCHES_DIR/clang/bin/llvm-nm"
export RANLIB="$MOZ_FETCHES_DIR/clang/bin/llvm-ranlib"

Просмотреть файл

@ -13,7 +13,6 @@ ac_add_options --with-branding=mobile/android/branding/beta
export MOZILLA_OFFICIAL=1
export AR="$MOZ_FETCHES_DIR/clang/bin/llvm-ar"
export NM="$MOZ_FETCHES_DIR/clang/bin/llvm-nm"
export RANLIB="$MOZ_FETCHES_DIR/clang/bin/llvm-ranlib"

Просмотреть файл

@ -15,7 +15,6 @@ export FENNEC_NIGHTLY=1
export MOZILLA_OFFICIAL=1
export AR="$MOZ_FETCHES_DIR/clang/bin/llvm-ar"
export NM="$MOZ_FETCHES_DIR/clang/bin/llvm-nm"
export RANLIB="$MOZ_FETCHES_DIR/clang/bin/llvm-ranlib"

Просмотреть файл

@ -12,7 +12,6 @@ ac_add_options --with-branding=mobile/android/branding/beta
export MOZILLA_OFFICIAL=1
export AR="$MOZ_FETCHES_DIR/clang/bin/llvm-ar"
export NM="$MOZ_FETCHES_DIR/clang/bin/llvm-nm"
export RANLIB="$MOZ_FETCHES_DIR/clang/bin/llvm-ranlib"

Просмотреть файл

@ -15,7 +15,6 @@ export FENNEC_NIGHTLY=1
export MOZILLA_OFFICIAL=1
export AR="$MOZ_FETCHES_DIR/clang/bin/llvm-ar"
export NM="$MOZ_FETCHES_DIR/clang/bin/llvm-nm"
export RANLIB="$MOZ_FETCHES_DIR/clang/bin/llvm-ranlib"

Просмотреть файл

@ -8,7 +8,6 @@ ac_add_options --with-branding=mobile/android/branding/beta
export MOZILLA_OFFICIAL=1
export AR="$MOZ_FETCHES_DIR/clang/bin/llvm-ar"
export NM="$MOZ_FETCHES_DIR/clang/bin/llvm-nm"
export RANLIB="$MOZ_FETCHES_DIR/clang/bin/llvm-ranlib"

Просмотреть файл

@ -10,7 +10,6 @@ export FENNEC_NIGHTLY=1
export MOZILLA_OFFICIAL=1
export AR="$MOZ_FETCHES_DIR/clang/bin/llvm-ar"
export NM="$MOZ_FETCHES_DIR/clang/bin/llvm-nm"
export RANLIB="$MOZ_FETCHES_DIR/clang/bin/llvm-ranlib"