bug 428431 - configure should add -wd flags to CFLAGS/CXXFLAGS for PGO builds. r=bsmedberg a=damons

This commit is contained in:
ted.mielczarek@gmail.com 2008-04-21 11:28:23 -07:00
Родитель 95b06bf3ca
Коммит 4b6b2486dd
1 изменённых файлов: 10 добавлений и 2 удалений

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

@ -1962,8 +1962,16 @@ case "$target" in
dnl For profile-guided optimization dnl For profile-guided optimization
PROFILE_GEN_CFLAGS="-GL" PROFILE_GEN_CFLAGS="-GL"
PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT" PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT"
PROFILE_USE_CFLAGS="-GL" dnl XXX: PGO builds can fail with warnings treated as errors,
dnl XXX: should be -LTCG:PGOPTIMIZE, but that fails on libxul dnl specifically "no profile data available" appears to be
dnl treated as an error sometimes. This might be a consequence
dnl of using WARNINGS_AS_ERRORS in some modules, combined
dnl with the linker doing most of the work in the whole-program
dnl optimization/PGO case. I think it's probably a compiler bug,
dnl but we work around it here.
PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
dnl XXX: should be -LTCG:PGOPTIMIZE, but that fails on libxul.
dnl Probably also a compiler bug, but what can you do?
PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE" PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
if test -n "$_USE_DYNAMICBASE"; then if test -n "$_USE_DYNAMICBASE"; then
LDFLAGS="$LDFLAGS -DYNAMICBASE" LDFLAGS="$LDFLAGS -DYNAMICBASE"