зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1621552 - Don't pass clang PGO runtime explicitly on Windows. r=dmajor
It turns out clang-cl adds an explicit /DEFAULTLIB:/full/path/to/runtime to all the .obj it creates, which makes the linker add it on its own. Differential Revision: https://phabricator.services.mozilla.com/D66368 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
244fd3bd68
Коммит
061c3f52b5
|
@ -64,10 +64,10 @@ def pgo_profile_path(path, pgo_use, profdata, build_env):
|
|||
|
||||
set_config('PGO_PROFILE_PATH', pgo_profile_path)
|
||||
|
||||
@depends(c_compiler, target, pgo_profile_path)
|
||||
@depends(c_compiler, pgo_profile_path)
|
||||
@imports('multiprocessing')
|
||||
@imports(_from='__builtin__', _import='min')
|
||||
def pgo_flags(compiler, target, profdata):
|
||||
def pgo_flags(compiler, profdata):
|
||||
if compiler.type == 'gcc':
|
||||
return namespace(
|
||||
gen_cflags=['-fprofile-generate'],
|
||||
|
@ -81,12 +81,7 @@ def pgo_flags(compiler, target, profdata):
|
|||
prefix = ''
|
||||
if compiler.type == 'clang-cl':
|
||||
prefix = '/clang:'
|
||||
if target.cpu == 'x86_64':
|
||||
gen_ldflags = ['clang_rt.profile-x86_64.lib']
|
||||
elif target.cpu == 'x86':
|
||||
gen_ldflags = ['clang_rt.profile-i386.lib']
|
||||
else:
|
||||
gen_ldflags = None
|
||||
gen_ldflags = None
|
||||
else:
|
||||
gen_ldflags = ['-fprofile-generate']
|
||||
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
if test -d "$MOZ_FETCHES_DIR/clang/bin"; then
|
||||
CLANG_DIR=`cd "$MOZ_FETCHES_DIR/clang/bin" ; pwd`
|
||||
export PATH="${CLANG_DIR}:${PATH}"
|
||||
|
||||
if $(cd $MOZ_FETCHES_DIR/clang/lib/clang/* && test -d lib/windows); then
|
||||
CLANG_LIB_DIR="$(cd $MOZ_FETCHES_DIR/clang/lib/clang/* && cd lib/windows && pwd)"
|
||||
export LIB=$LIB:$CLANG_LIB_DIR
|
||||
fi
|
||||
fi
|
||||
|
||||
export CC=clang-cl
|
||||
|
|
Загрузка…
Ссылка в новой задаче