Skip to content

Commit

Permalink
Bug 1204202 - Package Universal CRT DLLs for VS2015. r=glandium,ehsan
Browse files Browse the repository at this point in the history
  • Loading branch information
poiru committed Feb 2, 2016
1 parent 88ce1ce commit b316c91
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 11 deletions.
5 changes: 4 additions & 1 deletion b2g/installer/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@ DEFINES += -DJAREXT=
DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)

# Set MSVC dlls version to package, if any.
ifdef WIN32_REDIST_DIR
ifdef MOZ_NO_DEBUG_RTL
ifdef WIN32_REDIST_DIR
DEFINES += -DMOZ_PACKAGE_MSVC_DLLS=1
DEFINES += -DMSVC_C_RUNTIME_DLL=$(MSVC_C_RUNTIME_DLL)
DEFINES += -DMSVC_CXX_RUNTIME_DLL=$(MSVC_CXX_RUNTIME_DLL)
endif
ifdef WIN_UCRT_REDIST_DIR
DEFINES += -DMOZ_PACKAGE_WIN_UCRT_DLLS=1
endif
endif

ifdef MOZ_DEBUG
Expand Down
4 changes: 4 additions & 0 deletions b2g/installer/package-manifest.in
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@
@BINPATH@/@MSVC_C_RUNTIME_DLL@
@BINPATH@/@MSVC_CXX_RUNTIME_DLL@
#endif
#if MOZ_PACKAGE_WIN_UCRT_DLLS
@BINPATH@/api-ms-win-*.dll
@BINPATH@/ucrtbase.dll
#endif
#endif
#ifndef MOZ_NATIVE_ICU
#ifdef MOZ_SHARED_ICU
Expand Down
5 changes: 4 additions & 1 deletion browser/installer/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,15 @@ endif
DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)

# Set MSVC dlls version to package, if any.
ifdef WIN32_REDIST_DIR
ifdef MOZ_NO_DEBUG_RTL
ifdef WIN32_REDIST_DIR
DEFINES += -DMOZ_PACKAGE_MSVC_DLLS=1
DEFINES += -DMSVC_C_RUNTIME_DLL=$(MSVC_C_RUNTIME_DLL)
DEFINES += -DMSVC_CXX_RUNTIME_DLL=$(MSVC_CXX_RUNTIME_DLL)
endif
ifdef WIN_UCRT_REDIST_DIR
DEFINES += -DMOZ_PACKAGE_WIN_UCRT_DLLS=1
endif
endif

ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET)))
Expand Down
4 changes: 4 additions & 0 deletions browser/installer/package-manifest.in
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@
@BINPATH@/@MSVC_C_RUNTIME_DLL@
@BINPATH@/@MSVC_CXX_RUNTIME_DLL@
#endif
#if MOZ_PACKAGE_WIN_UCRT_DLLS
@BINPATH@/api-ms-win-*.dll
@BINPATH@/ucrtbase.dll
#endif
#endif
#ifndef MOZ_NATIVE_ICU
#ifdef MOZ_SHARED_ICU
Expand Down
23 changes: 14 additions & 9 deletions build/win32/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,26 @@

include $(topsrcdir)/config/rules.mk

REDIST_FILES =

ifdef WIN32_REDIST_DIR
REDIST_FILES += '$(WIN32_REDIST_DIR)'/$(MSVC_C_RUNTIME_DLL)
REDIST_FILES += '$(WIN32_REDIST_DIR)'/$(MSVC_CXX_RUNTIME_DLL)
endif

REDIST_FILES = \
$(MSVC_C_RUNTIME_DLL) \
$(MSVC_CXX_RUNTIME_DLL) \
$(NULL)
ifdef WIN_UCRT_REDIST_DIR
REDIST_FILES += $(wildcard $(WIN_UCRT_REDIST_DIR)/api-ms-win-*.dll)
REDIST_FILES += '$(WIN_UCRT_REDIST_DIR)'/ucrtbase.dll
endif

ifdef REDIST_FILES
libs-preqs = \
$(call mkdir_deps,$(FINAL_TARGET)) \
$(NULL)
$(call mkdir_deps,$(FINAL_TARGET)) \
$(NULL)

libs:: $(libs-preqs)
install --preserve-timestamps $(foreach f,$(REDIST_FILES),'$(WIN32_REDIST_DIR)'/$(f)) $(FINAL_TARGET)

endif # WIN32_REDIST_DIR
install --preserve-timestamps $(REDIST_FILES) $(FINAL_TARGET)
endif

# run the binscope tool to make sure the binary and all libraries
# are using all available Windows OS-level security mechanisms
Expand Down
7 changes: 7 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,13 @@ case "$target" in
# C4091: 'typedef ': ignored on left of '' when no variable is declared
CFLAGS="$CFLAGS -wd4091"
CXXFLAGS="$CXXFLAGS -wd4091"

if test -n "$WIN_UCRT_REDIST_DIR"; then
if test ! -d "$WIN_UCRT_REDIST_DIR"; then
AC_MSG_ERROR([Invalid Windows UCRT Redist directory: ${WIN_UCRT_REDIST_DIR}])
fi
WIN_UCRT_REDIST_DIR=`cd "$WIN_UCRT_REDIST_DIR" && pwd`
fi
else
AC_MSG_ERROR([This version (${_CC_MAJOR_VERSION}.${_CC_MINOR_VERSION}.${_CC_BUILD_VERSION}) of the MSVC compiler is unsupported.
You must install Visual C++ 2013 Update 3, Visual C++ 2015 Update 1, or newer in order to build.
Expand Down

0 comments on commit b316c91

Please sign in to comment.