diff --git a/js/src/Makefile.in b/js/src/Makefile.in
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -180,8 +180,19 @@ clean::
 	DIST=$(DIST) \
 	MOZJS_MAJOR_VERSION=$(MOZJS_MAJOR_VERSION) \
 	MOZJS_MINOR_VERSION=$(MOZJS_MINOR_VERSION) \
 	MOZJS_PATCH_VERSION=$(MOZJS_PATCH_VERSION) \
 	MOZJS_ALPHA=$(MOZJS_ALPHA) \
 	$(srcdir)/make-source-package.sh clean
 
 endif
+
+ifdef _MSC_VER
+ifeq (WINNT_1,$(OS_ARCH)_$(MOZ_PROFILE_GENERATE)$(MOZ_PROFILE_USE))
+ifneq (x86_64, $(TARGET_CPU))
+ifdef ENABLE_ION
+# Optimizer bug with MSVC PGO
+Trampoline-x86.$(OBJ_SUFFIX): COMPILE_CXXFLAGS += -GL-
+endif
+endif
+endif
+endif # _MSC_VER
