2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # Determines the platform and builds the macros needed to load the
10 # appropriate platform-specific .mk file, then defines all (most?)
11 # of the generic macros.
14 # Define an include-at-most-once flag
15 ifdef INCLUDED_CONFIG_MK
16 $(error Do not
include config.mk twice
!)
18 INCLUDED_CONFIG_MK
= 1
20 EXIT_ON_ERROR
= set
-e
; # Shell loops continue past errors without this.
26 ifndef INCLUDED_AUTOCONF_MK
27 include $(DEPTH
)/config
/autoconf.mk
30 -include $(DEPTH
)/.mozconfig.mk
32 ifndef EXTERNALLY_MANAGED_MAKE_FILE
33 # Import the automatically generated backend file. If this file doesn't exist,
34 # the backend hasn't been properly configured. We want this to be a fatal
35 # error, hence not using "-include".
36 ifndef STANDALONE_MAKEFILE
37 GLOBAL_DEPS
+= backend.mk
43 space
= $(NULL
) $(NULL
)
45 # Include defs.mk files that can be found in $(srcdir)/$(DEPTH),
46 # $(srcdir)/$(DEPTH-1), $(srcdir)/$(DEPTH-2), etc., and $(srcdir)
47 # where $(DEPTH-1) is one level less of depth, $(DEPTH-2), two, etc.
48 # i.e. for DEPTH=../../.., DEPTH-1 is ../.. and DEPTH-2 is ..
49 # These defs.mk files are used to define variables in a directory
50 # and all its subdirectories, recursively.
51 __depth
:= $(subst /, ,$(DEPTH
))
55 $(foreach __d
,$(__depth
) .
,$(eval __depth
= $(wordlist
2,$(words $(__depth
)),$(__depth
))$(eval
-include $(subst $(space
),/,$(strip $(srcdir) $(__depth
) defs.mk
)))))
59 # Sanity check some variables
66 INSTALL_EXTENSION_ID \
72 # checks for internal spaces or trailing spaces in the variable
74 check-variable
= $(if
$(filter-out 0 1,$(words $($(x
))z
)),$(error Spaces are not allowed in
$(x
)))
76 $(foreach x
,$(CHECK_VARS
),$(check-variable
))
78 ifndef INCLUDED_FUNCTIONS_MK
79 include $(MOZILLA_DIR
)/config
/makefiles
/functions.mk
84 # FINAL_TARGET specifies the location into which we copy end-user-shipped
85 # build products (typelibs, components, chrome). It may already be specified by
88 # If XPI_NAME is set, the files will be shipped to $(DIST)/xpi-stage/$(XPI_NAME)
89 # instead of $(DIST)/bin. In both cases, if DIST_SUBDIR is set, the files will be
90 # shipped to a $(DIST_SUBDIR) subdirectory.
91 FINAL_TARGET ?
= $(if
$(XPI_NAME
),$(DIST
)/xpi-stage
/$(XPI_NAME
),$(DIST
)/bin
)$(DIST_SUBDIR
:%=/%)
92 # Override the stored value for the check to make sure that the variable is not
93 # redefined in the Makefile.in value.
94 FINAL_TARGET_FROZEN
:= '$(FINAL_TARGET)'
97 ACDEFINES
+= -DXPI_NAME
=$(XPI_NAME
)
100 # The VERSION_NUMBER is suffixed onto the end of the DLLs we ship.
103 ifeq ($(HOST_OS_ARCH
),WINNT
)
104 ifeq ($(MOZILLA_DIR
),$(topsrcdir
))
105 win_srcdir
:= $(subst $(topsrcdir
),$(WIN_TOP_SRC
),$(srcdir))
107 # This means we're in comm-central's topsrcdir, so we need to adjust
108 # WIN_TOP_SRC (which points to mozilla's topsrcdir) for the substitution
110 cc_WIN_TOP_SRC
:= $(WIN_TOP_SRC
:%/mozilla
=%)
111 win_srcdir
:= $(subst $(topsrcdir
),$(cc_WIN_TOP_SRC
),$(srcdir))
113 BUILD_TOOLS
= $(WIN_TOP_SRC
)/build
/unix
115 win_srcdir
:= $(srcdir)
116 BUILD_TOOLS
= $(MOZILLA_DIR
)/build
/unix
119 CONFIG_TOOLS
= $(MOZ_BUILD_ROOT
)/config
120 AUTOCONF_TOOLS
= $(MOZILLA_DIR
)/build
/autoconf
123 CC_WRAPPER ?
= $(call py_action
,cl
)
124 CXX_WRAPPER ?
= $(call py_action
,cl
)
127 CC
:= $(CC_WRAPPER
) $(CC
)
128 CXX
:= $(CXX_WRAPPER
) $(CXX
)
133 PYTHON_PATH
= $(PYTHON
) $(topsrcdir
)/config
/pythonpath.py
135 # determine debug-related options
141 ifneq (,$(MOZ_DEBUG
)$(MOZ_DEBUG_SYMBOLS
))
143 ifeq ($(OS_ARCH
)_
$(GNU_CC
),WINNT_
)
144 _DEBUG_ASFLAGS
+= -g cv8
146 ifneq ($(OS_ARCH
),Darwin
)
147 _DEBUG_ASFLAGS
+= -g dwarf2
151 _DEBUG_ASFLAGS
+= $(MOZ_DEBUG_FLAGS
)
153 _DEBUG_CFLAGS
+= $(MOZ_DEBUG_FLAGS
)
154 _DEBUG_LDFLAGS
+= $(MOZ_DEBUG_LDFLAGS
)
155 _DEBUG_RUSTFLAGS
+= -g
158 ASFLAGS
+= $(_DEBUG_ASFLAGS
)
159 OS_CFLAGS
+= $(_DEBUG_CFLAGS
)
160 OS_CXXFLAGS
+= $(_DEBUG_CFLAGS
)
161 OS_LDFLAGS
+= $(_DEBUG_LDFLAGS
)
162 RUSTFLAGS
+= $(_DEBUG_RUSTFLAGS
)
164 # XXX: What does this? Bug 482434 filed for better explanation.
165 ifeq ($(OS_ARCH
)_
$(GNU_CC
),WINNT_
)
168 # MOZ_DEBUG_SYMBOLS generates debug symbols in separate PDB files.
169 # Used for generating an optimized build with debugging symbols.
170 # Used in the Windows nightlies to generate symbols for crash reporting.
171 ifdef MOZ_DEBUG_SYMBOLS
172 ifdef HAVE_64BIT_BUILD
173 OS_LDFLAGS
+= -DEBUG
-OPT
:REF
,ICF
175 OS_LDFLAGS
+= -DEBUG
-OPT
:REF
180 # Handle DMD in optimized builds.
183 ifdef HAVE_64BIT_BUILD
184 OS_LDFLAGS
= -DEBUG
-OPT
:REF
,ICF
186 OS_LDFLAGS
= -DEBUG
-OPT
:REF
192 endif # WINNT && !GNU_CC
195 # Build using PIC by default
199 # Don't build SIMPLE_PROGRAMS with PGO, since they don't need it anyway,
200 # and we don't have the same build logic to re-link them in the second pass.
201 ifdef SIMPLE_PROGRAMS
202 NO_PROFILE_GUIDED_OPTIMIZE
= 1
205 # No sense in profiling unit tests
207 NO_PROFILE_GUIDED_OPTIMIZE
= 1
210 # Enable profile-based feedback
211 ifneq (1,$(NO_PROFILE_GUIDED_OPTIMIZE
))
212 ifdef MOZ_PROFILE_GENERATE
213 OS_CFLAGS
+= $(if
$(filter $(notdir $<),$(notdir $(NO_PROFILE_GUIDED_OPTIMIZE
))),,$(PROFILE_GEN_CFLAGS
))
214 OS_CXXFLAGS
+= $(if
$(filter $(notdir $<),$(notdir $(NO_PROFILE_GUIDED_OPTIMIZE
))),,$(PROFILE_GEN_CFLAGS
))
215 OS_LDFLAGS
+= $(PROFILE_GEN_LDFLAGS
)
216 ifeq (WINNT
,$(OS_ARCH
))
219 endif # MOZ_PROFILE_GENERATE
221 ifdef MOZ_PROFILE_USE
222 OS_CFLAGS
+= $(if
$(filter $(notdir $<),$(notdir $(NO_PROFILE_GUIDED_OPTIMIZE
))),,$(PROFILE_USE_CFLAGS
))
223 OS_CXXFLAGS
+= $(if
$(filter $(notdir $<),$(notdir $(NO_PROFILE_GUIDED_OPTIMIZE
))),,$(PROFILE_USE_CFLAGS
))
224 OS_LDFLAGS
+= $(PROFILE_USE_LDFLAGS
)
225 ifeq (WINNT
,$(OS_ARCH
))
228 endif # MOZ_PROFILE_USE
229 endif # NO_PROFILE_GUIDED_OPTIMIZE
233 -f
$(MOZ_JAR_MAKER_FILE_FORMAT
) \
236 ifdef USE_EXTENSION_MANIFEST
237 MAKE_JARS_FLAGS
+= -e
240 TAR_CREATE_FLAGS
= -chf
243 # Personal makefile customizations go in these optional make include files.
245 MY_CONFIG
:= $(DEPTH
)/config
/myconfig.mk
246 MY_RULES
:= $(DEPTH
)/config
/myrules.mk
249 # Default command macros; can be overridden in <arch>.mk.
257 -I
$(ABS_DIST
)/include \
261 # NSPR_CFLAGS and NSS_CFLAGS must appear ahead of the other flags to avoid Linux
262 # builds wrongly picking up system NSPR/NSS header files.
264 $(NSPR_CFLAGS
) $(NSS_CFLAGS
) \
268 $(MOZ_PIXMAN_CFLAGS
) \
272 include $(MOZILLA_DIR
)/config
/static-checking-config.mk
274 CFLAGS
= $(OS_CPPFLAGS
) $(OS_CFLAGS
)
275 CXXFLAGS
= $(OS_CPPFLAGS
) $(OS_CXXFLAGS
)
276 LDFLAGS
= $(OS_LDFLAGS
) $(MOZBUILD_LDFLAGS
) $(MOZ_FIX_LINK_PATHS
)
279 ifeq (1,$(MOZ_OPTIMIZE
))
280 ifneq (,$(if
$(MOZ_PROFILE_GENERATE
)$(MOZ_PROFILE_USE
),$(MOZ_PGO_OPTIMIZE_FLAGS
)))
281 CFLAGS
+= $(MOZ_PGO_OPTIMIZE_FLAGS
)
282 CXXFLAGS
+= $(MOZ_PGO_OPTIMIZE_FLAGS
)
284 CFLAGS
+= $(MOZ_OPTIMIZE_FLAGS
)
285 CXXFLAGS
+= $(MOZ_OPTIMIZE_FLAGS
)
286 endif # neq (,$(MOZ_PROFILE_GENERATE)$(MOZ_PROFILE_USE))
288 CFLAGS
+= $(MOZ_OPTIMIZE_FLAGS
)
289 CXXFLAGS
+= $(MOZ_OPTIMIZE_FLAGS
)
290 endif # MOZ_OPTIMIZE == 1
291 LDFLAGS
+= $(MOZ_OPTIMIZE_LDFLAGS
)
292 RUSTFLAGS
+= $(MOZ_OPTIMIZE_RUSTFLAGS
)
295 HOST_CFLAGS
+= $(_DEPEND_CFLAGS
)
296 HOST_CXXFLAGS
+= $(_DEPEND_CFLAGS
)
298 HOST_CFLAGS
+= $(HOST_OPTIMIZE_FLAGS
)
301 ifeq (1,$(MOZ_OPTIMIZE
))
302 HOST_CFLAGS
+= $(MOZ_OPTIMIZE_FLAGS
)
304 HOST_CFLAGS
+= $(MOZ_OPTIMIZE_FLAGS
)
305 endif # MOZ_OPTIMIZE == 1
307 endif # CROSS_COMPILE
309 CFLAGS
+= $(MOZ_FRAMEPTR_FLAGS
)
310 CXXFLAGS
+= $(MOZ_FRAMEPTR_FLAGS
)
312 # Check for ALLOW_COMPILER_WARNINGS (shorthand for Makefiles to request that we
313 # *don't* use the warnings-as-errors compile flags)
315 # Don't use warnings-as-errors in Windows PGO builds because it is suspected of
316 # causing problems in that situation. (See bug 437002.)
317 ifeq (WINNT_1
,$(OS_ARCH
)_
$(MOZ_PROFILE_GENERATE
)$(MOZ_PROFILE_USE
))
318 ALLOW_COMPILER_WARNINGS
=1
319 endif # WINNT && (MOS_PROFILE_GENERATE ^ MOZ_PROFILE_USE)
321 # Don't use warnings-as-errors in clang-cl because it warns about many more
322 # things than MSVC does.
324 ALLOW_COMPILER_WARNINGS
=1
327 # Use warnings-as-errors if ALLOW_COMPILER_WARNINGS is not set to 1 (which
328 # includes the case where it's undefined).
329 ifneq (1,$(ALLOW_COMPILER_WARNINGS
))
330 CXXFLAGS
+= $(WARNINGS_AS_ERRORS
)
331 CFLAGS
+= $(WARNINGS_AS_ERRORS
)
332 endif # ALLOW_COMPILER_WARNINGS
334 COMPILE_CFLAGS
= $(VISIBILITY_FLAGS
) $(DEFINES
) $(INCLUDES
) $(OS_INCLUDES
) $(DSO_CFLAGS
) $(DSO_PIC_CFLAGS
) $(RTL_FLAGS
) $(OS_COMPILE_CFLAGS
) $(_DEPEND_CFLAGS
) $(CFLAGS
) $(MOZBUILD_CFLAGS
)
335 COMPILE_CXXFLAGS
= $(if
$(DISABLE_STL_WRAPPING
),,$(STL_FLAGS
)) $(VISIBILITY_FLAGS
) $(DEFINES
) $(INCLUDES
) $(OS_INCLUDES
) $(DSO_CFLAGS
) $(DSO_PIC_CFLAGS
) $(RTL_FLAGS
) $(OS_COMPILE_CXXFLAGS
) $(_DEPEND_CFLAGS
) $(CXXFLAGS
) $(MOZBUILD_CXXFLAGS
)
336 COMPILE_CMFLAGS
= $(OS_COMPILE_CMFLAGS
) $(MOZBUILD_CMFLAGS
)
337 COMPILE_CMMFLAGS
= $(OS_COMPILE_CMMFLAGS
) $(MOZBUILD_CMMFLAGS
)
338 ASFLAGS
+= $(MOZBUILD_ASFLAGS
)
341 HOST_CFLAGS
+= $(RTL_FLAGS
)
344 HOST_CFLAGS
+= $(HOST_DEFINES
) $(MOZBUILD_HOST_CFLAGS
)
345 HOST_CXXFLAGS
+= $(HOST_DEFINES
) $(MOZBUILD_HOST_CXXFLAGS
)
348 # Name of the binary code directories
352 SDK_LIB_DIR
= $(DIST
)/sdk
/lib
353 SDK_BIN_DIR
= $(DIST
)/sdk
/bin
357 ifdef MACOSX_DEPLOYMENT_TARGET
358 export MACOSX_DEPLOYMENT_TARGET
359 endif # MACOSX_DEPLOYMENT_TARGET
361 ifdef MOZ_USING_CCACHE
367 # Set link flags according to whether we want a console.
368 ifeq ($(OS_ARCH
),WINNT
)
370 ifeq ($(MOZ_WINCONSOLE
),1)
371 WIN32_EXE_LDFLAGS
+= $(WIN32_CONSOLE_EXE_LDFLAGS
)
372 else # MOZ_WINCONSOLE
373 WIN32_EXE_LDFLAGS
+= $(WIN32_GUI_EXE_LDFLAGS
)
376 # For setting subsystem version
377 WIN32_EXE_LDFLAGS
+= $(WIN32_CONSOLE_EXE_LDFLAGS
)
382 ifeq ($(CPU_ARCH
),x86_64
)
383 # set stack to 2MB on x64 build. See bug 582910
384 WIN32_EXE_LDFLAGS
+= -STACK
:2097152
389 # Include any personal overrides the user might think are needed.
391 -include $(topsrcdir
)/$(MOZ_BUILD_APP
)/app-config.mk
392 -include $(MY_CONFIG
)
394 ######################################################################
396 GARBAGE
+= $(DEPENDENCIES
) core
$(wildcard core.
[0-9]*) $(wildcard *.err
) $(wildcard *.pure
) $(wildcard *_pure_
*.o
) Templates.DB
398 ifeq ($(OS_ARCH
),Darwin
)
400 NSDISTMODE
=absolute_symlink
405 NSINSTALL_PY
:= $(PYTHON
) $(abspath
$(MOZILLA_DIR
)/config
/nsinstall.py
)
406 # For Pymake, wherever we use nsinstall.py we're also going to try to make it
407 # a native command where possible. Since native commands can't be used outside
408 # of single-line commands, we continue to provide INSTALL for general use.
409 # Single-line commands should be switched over to install_cmd.
410 NSINSTALL_NATIVECMD
:= %nsinstall nsinstall
413 NSINSTALL
= $(NSINSTALL_BIN
)
415 ifeq ($(HOST_OS_ARCH
),WINNT
)
416 NSINSTALL
= $(NSINSTALL_PY
)
418 NSINSTALL
= $(DEPTH
)/config
/nsinstall
$(HOST_BIN_SUFFIX
)
420 endif # NSINSTALL_BIN
423 ifeq (,$(CROSS_COMPILE
)$(filter-out WINNT
, $(OS_ARCH
)))
424 INSTALL
= $(NSINSTALL
) -t
428 # This isn't laid out as conditional directives so that NSDISTMODE can be
430 INSTALL
= $(if
$(filter copy
, $(NSDISTMODE
)), $(NSINSTALL
) -t
, $(if
$(filter absolute_symlink
, $(NSDISTMODE
)), $(NSINSTALL
) -L
$(PWD
), $(NSINSTALL
) -R
))
434 # The default for install_cmd is simply INSTALL
435 install_cmd ?
= $(INSTALL
) $(1)
437 # Use nsinstall in copy mode to install files on the system
438 SYSINSTALL
= $(NSINSTALL
) -t
439 # This isn't necessarily true, just here
440 sysinstall_cmd
= install_cmd
443 # Localization build automation
446 # Because you might wish to "make locales AB_CD=ab-CD", we don't hardcode
447 # MOZ_UI_LOCALE directly, but use an intermediate variable that can be
448 # overridden by the command line. (Besides, AB_CD is prettier).
449 AB_CD
= $(MOZ_UI_LOCALE
)
450 # Many locales directories want this definition.
451 ACDEFINES
+= -DAB_CD
=$(AB_CD
)
454 L10NBASEDIR
= $(error L10NBASEDIR not defined by configure
)
456 IS_LANGUAGE_REPACK
= 1
459 EXPAND_LOCALE_SRCDIR
= $(if
$(filter en-US
,$(AB_CD
)),$(topsrcdir
)/$(1)/en-US
,$(or
$(realpath
$(L10NBASEDIR
)),$(abspath
$(L10NBASEDIR
)))/$(AB_CD
)/$(subst /locales
,,$(1)))
462 LOCALE_SRCDIR ?
= $(call EXPAND_LOCALE_SRCDIR
,$(relativesrcdir
))
466 MAKE_JARS_FLAGS
+= --relativesrcdir
=$(relativesrcdir
)
467 ifneq (en-US
,$(AB_CD
))
468 ifdef LOCALE_MERGEDIR
469 MAKE_JARS_FLAGS
+= --locale-mergedir
=$(LOCALE_MERGEDIR
)
471 ifdef IS_LANGUAGE_REPACK
472 MAKE_JARS_FLAGS
+= --l10n-base
=$(L10NBASEDIR
)/$(AB_CD
)
475 MAKE_JARS_FLAGS
+= -c
$(LOCALE_SRCDIR
)
478 MAKE_JARS_FLAGS
+= -c
$(LOCALE_SRCDIR
)
479 endif # ! relativesrcdir
481 ifdef LOCALE_MERGEDIR
482 MERGE_FILE
= $(firstword \
483 $(wildcard $(LOCALE_MERGEDIR
)/$(subst /locales
,,$(relativesrcdir
))/$(1)) \
484 $(wildcard $(LOCALE_SRCDIR
)/$(1)) \
485 $(srcdir)/en-US
/$(1) )
487 MERGE_FILE
= $(LOCALE_SRCDIR
)/$(1)
489 MERGE_FILES
= $(foreach f
,$(1),$(call MERGE_FILE
,$(f
)))
491 # These marcros are similar to MERGE_FILE, but no merging, and en-US first.
492 # They're used for searchplugins, for example.
493 EN_US_OR_L10N_FILE
= $(firstword \
494 $(wildcard $(srcdir)/en-US
/$(1)) \
495 $(LOCALE_SRCDIR
)/$(1) )
496 EN_US_OR_L10N_FILES
= $(foreach f
,$(1),$(call EN_US_OR_L10N_FILE
,$(f
)))
498 ifneq (WINNT
,$(OS_ARCH
))
499 RUN_TEST_PROGRAM
= $(DIST
)/bin
/run-mozilla.sh
506 # Make sure any compiled classes work with at least JVM 1.4
507 JAVAC_FLAGS
+= -source
1.4
513 CREATE_PRECOMPLETE_CMD
= $(PYTHON
) $(abspath
$(MOZILLA_DIR
)/config
/createprecomplete.py
)
515 # MDDEPDIR is the subdirectory where dependency files are stored
518 EXPAND_LIBS_EXEC
= $(PYTHON
) $(MOZILLA_DIR
)/config
/expandlibs_exec.py
519 EXPAND_LIBS_GEN
= $(PYTHON
) $(MOZILLA_DIR
)/config
/expandlibs_gen.py
520 EXPAND_AR
= $(EXPAND_LIBS_EXEC
) --extract
-- $(AR
)
521 EXPAND_CC
= $(EXPAND_LIBS_EXEC
) --uselist
-- $(CC
)
522 EXPAND_CCC
= $(EXPAND_LIBS_EXEC
) --uselist
-- $(CCC
)
523 EXPAND_LD
= $(EXPAND_LIBS_EXEC
) --uselist
-- $(LD
)
524 EXPAND_MKSHLIB_ARGS
= --uselist
526 EXPAND_MKSHLIB_ARGS
+= --symbol-order
$(SYMBOL_ORDER
)
528 EXPAND_MKSHLIB
= $(EXPAND_LIBS_EXEC
) $(EXPAND_MKSHLIB_ARGS
) -- $(MKSHLIB
)
530 # $(call CHECK_SYMBOLS,lib,PREFIX,dep_name,test)
531 # Checks that the given `lib` doesn't contain dependency on symbols with a
532 # version starting with `PREFIX`_ and matching the `test`. `dep_name` is only
533 # used for the error message.
534 # `test` is an awk expression using the information in the variable `v` which
535 # contains a list of version items ([major, minor, ...]).
537 @
$(TOOLCHAIN_PREFIX
)readelf
-sW
$(1) | \
538 awk
'$$8 ~ /@$(2)_/ { \
544 print "TEST-UNEXPECTED-FAIL | check_stdcxx | We do not want these $(3) symbol versions to be used:" \
557 ifneq (,$(MOZ_LIBSTDCXX_TARGET_VERSION
)$(MOZ_LIBSTDCXX_HOST_VERSION
))
558 CHECK_STDCXX
= $(call CHECK_SYMBOLS
,$(1),GLIBCXX
,libstdc
++,v
[1] > 3 ||
(v
[1] == 3 && v
[2] == 4 && v
[3] > 16))
559 CHECK_GLIBC
= $(call CHECK_SYMBOLS
,$(1),GLIBC
,libc
,v
[1] > 2 ||
(v
[1] == 2 && v
[2] > 12))
562 ifeq (,$(filter $(OS_TARGET
),WINNT Darwin
))
563 CHECK_TEXTREL
= @
$(TOOLCHAIN_PREFIX
)readelf
-d
$(1) | grep TEXTREL
> /dev
/null
&& echo
'TEST-UNEXPECTED-FAIL | check_textrel | We do not want text relocations in libraries and programs' || true
566 ifeq ($(MOZ_WIDGET_TOOLKIT
),android
)
567 # While this is very unlikely (libc being added by the compiler at the end
568 # of the linker command line), if libmozglue.so ends up after libc.so, all
569 # hell breaks loose, so better safe than sorry, and check it's actually the
571 CHECK_MOZGLUE_ORDER
= @
$(TOOLCHAIN_PREFIX
)readelf
-d
$(1) | grep NEEDED | awk
'{ libs[$$NF] = ++n } END { if (libs["[libmozglue.so]"] && libs["[libc.so]"] < libs["[libmozglue.so]"]) { print "libmozglue.so must be linked before libc.so"; exit 1 } }'
575 $(call CHECK_GLIBC
,$(1))
576 $(call CHECK_STDCXX
,$(1))
577 $(call CHECK_TEXTREL
,$(1))
578 $(call LOCAL_CHECKS
,$(1))
579 $(call CHECK_MOZGLUE_ORDER
,$(1))
582 # autoconf.mk sets OBJ_SUFFIX to an error to avoid use before including
584 OBJ_SUFFIX
:= $(_OBJ_SUFFIX
)
586 # PGO builds with GCC build objects with instrumentation in a first pass,
587 # then objects optimized, without instrumentation, in a second pass. If
588 # we overwrite the objects from the first pass with those from the second,
589 # we end up not getting instrumentation data for better optimization on
590 # incremental builds. As a consequence, we use a different object suffix
591 # for the first pass.
592 ifndef NO_PROFILE_GUIDED_OPTIMIZE
593 ifdef MOZ_PROFILE_GENERATE
600 PLY_INCLUDE
= -I
$(MOZILLA_DIR
)/other-licenses
/ply
602 export CL_INCLUDES_PREFIX
603 # Make sure that the build system can handle non-ASCII characters
604 # in environment variables to prevent it from breking silently on
605 # non-English systems.