Bug 1852740: add tests for the `fetchpriority` attribute in Link headers. r=necko...
[gecko.git] / js / src / Makefile.in
blob6daed727342d38a32784b979fdbcf2c07f7aec2c
1 # -*- Mode: makefile -*-
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 ifeq (,$(MAKE_VERSION))
8 $(error GNU Make is required)
9 endif
10 make_min_ver := 3.81
11 ifneq ($(make_min_ver),$(firstword $(sort $(make_min_ver) $(MAKE_VERSION))))
12 $(error GNU Make $(make_min_ver) or higher is required)
13 endif
15 DASH_R = -r
17 # Define keyword generator before rules.mk, see bug 323979 comment 50
19 USE_HOST_CXX = 1
21 include $(topsrcdir)/config/rules.mk
23 ifdef MOZ_VALGRIND
24 ifndef MOZ_ASAN
25 JITTEST_VALGRIND_FLAG = --valgrind
26 endif
27 endif
29 ifneq ($(LLVM_SYMBOLIZER),)
30 # Use the LLVM symbolizer when running jit-tests under ASan and TSan, if available
31 ifdef MOZ_ASAN
32 JITTEST_SANITIZER_ENV=ASAN_SYMBOLIZER_PATH='$(LLVM_SYMBOLIZER)'
33 endif
34 ifdef MOZ_TSAN
35 JITTEST_SANITIZER_ENV=TSAN_OPTIONS="external_symbolizer_path=$(LLVM_SYMBOLIZER) handle_segv=0 $$TSAN_OPTIONS"
36 endif
37 ifdef MOZ_MSAN
38 JITTEST_SANITIZER_ENV=MSAN_SYMBOLIZER_PATH='$(LLVM_SYMBOLIZER)'
39 endif
40 endif
42 check-js-msg::
43 (cd $(topsrcdir) && $(PYTHON3) $(topsrcdir)/config/check_js_msg_encoding.py);
45 check-jit-test::
46 $(JITTEST_SANITIZER_ENV) $(wildcard $(RUN_TEST_PROGRAM)) $(PYTHON3) -u $(srcdir)/jit-test/jit_test.py \
47 --no-slow --no-progress --format=automation --jitflags=all \
48 $(JITTEST_VALGRIND_FLAG) \
49 $(JITTEST_EXTRA_ARGS) \
50 $(DIST)/bin/js$(BIN_SUFFIX) $(JITTEST_TEST_ARGS)
52 check:: check-js-msg
54 check-jstests:
55 $(wildcard $(RUN_TEST_PROGRAM)) $(PYTHON3) -u $(srcdir)/tests/jstests.py \
56 --no-progress --format=automation --timeout 300 \
57 $(JSTESTS_EXTRA_ARGS) \
58 $(DIST)/bin/js$(BIN_SUFFIX)
60 # FIXME:
61 # We want to run check-jstests as part of |make check| on all platforms, on
62 # tinderbox. However, some configurations don't work quite right just yet.
63 # Rather than risking regressions in major configurations while fixing these
64 # secondary configuration, we work around them and fix the bugs later.
66 # Bug 652154: On Windows, SM(!m !t) don't work because of path problems with
67 # their unusual directory layout
69 # Bug 652155: On Mac, SM(d) doesn't work for unknown reasons
71 ifneq ($(OS_ARCH),WINNT)
72 ifndef HAVE_DTRACE
73 #check:: check-jstests
74 endif
75 endif
77 CFLAGS += $(MOZ_ZLIB_CFLAGS)
79 # Silence warnings on AIX/HP-UX from non-GNU compilers
80 ifndef GNU_CC
81 ifeq ($(OS_ARCH),AIX)
82 # Suppress warnings from xlC
83 # 1540-1281: offsetof() on null non-POD types
84 # 1540-1608: anonymous unions using static data members
85 CFLAGS += -qsuppress=1540-1281 -qsuppress=1540-1608
86 CXXFLAGS += -qsuppress=1540-1281 -qsuppress=1540-1608
87 endif
88 ifeq ($(OS_ARCH),HP-UX)
89 # Suppress warnings from aCC
90 # 3055: anonymous unions declaring types
91 # 4189: offsetof() on non-POD types
92 CFLAGS += +W3055,4189
93 CXXFLAGS += +W3055,4189
94 endif
95 endif
96 ifeq ($(OS_ARCH),SunOS)
97 ifeq ($(TARGET_CPU),sparc)
99 ifdef GNU_CC
100 CFLAGS += -mcpu=v9
101 CXXFLAGS += -mcpu=v9
102 endif # GNU_CC
104 endif
105 endif
107 install::
108 $(MAKE) -C build install
109 $(MAKE) -C shell install
111 ifdef HAVE_DTRACE
112 javascript-trace.h: $(srcdir)/devtools/javascript-trace.d
113 dtrace -x nolibs -h -s $(srcdir)/devtools/javascript-trace.d -o javascript-trace.h.in
114 sed -e 's/if _DTRACE_VERSION/ifdef INCLUDE_MOZILLA_DTRACE/' \
115 -e '/const/!s/char \*/const char */g' \
116 javascript-trace.h.in > javascript-trace.h
118 # We can't automatically generate dependencies on auto-generated headers;
119 # we have to list them explicitly.
120 $(addsuffix .$(OBJ_SUFFIX),Probes jsinterp jsobj): $(CURDIR)/javascript-trace.h
122 ifneq ($(OS_ARCH),Darwin)
123 DTRACE_PROBE_OBJ = js-dtrace.$(OBJ_SUFFIX)
124 $(LIBRARY): $(DTRACE_PROBE_OBJ)
125 $(DTRACE_PROBE_OBJ): $(srcdir)/devtools/javascript-trace.d $(OBJS)
126 dtrace -x nolibs -G -C -s $< -o $@ $(filter-out $<, $^)
128 OBJS += $(DTRACE_PROBE_OBJ)
129 endif # OS_ARCH != Darwin
130 endif # HAVE_DTRACE
132 ###############################################
133 # Generating source package tarballs
134 # (only possible when tar is found)
135 ifneq (,$(TAR))
137 source-package:
138 SRCDIR=$(srcdir) \
139 DIST=$(DIST) \
140 MKDIR=$(MKDIR) \
141 TAR=$(TAR) \
142 M4=$(M4) \
143 AWK=$(AWK) \
144 MOZJS_MAJOR_VERSION=$(MOZJS_MAJOR_VERSION) \
145 MOZJS_MINOR_VERSION=$(MOZJS_MINOR_VERSION) \
146 MOZJS_PATCH_VERSION=$(MOZJS_PATCH_VERSION) \
147 MOZJS_ALPHA=$(MOZJS_ALPHA) \
148 $(srcdir)/make-source-package.sh
150 endif