Commit Graph

1378 Commits

Author SHA1 Message Date
Ted Mielczarek
4def48d158 bug 1409276 - pass C/C++ compilers and flags to cargo for use in build scripts. r=chmanchester
MozReview-Commit-ID: 3uEwzYJUQDA

--HG--
extra : rebase_source : 8c291fcff6dfdbf8c17c886057570fb87f824bed
2018-07-05 07:22:02 -04:00
Mike Hommey
0f5d8527e2 Bug 1476874 - Only link object once in static libraries. r=froydnj
--HG--
extra : rebase_source : d4654d226b4bebf75b65eccff254d26a6880082c
2018-07-19 16:30:19 +09:00
Nathan Froyd
0daa8edfcc Bug 1444171 - Add pgo-generate-only source functionality; r=glandium
For clang-cl, we want to add code to libxul that only exists during the
PGO generation phase, so we can collect data.  The most expedient way to
do that is to enable certain files in SOURCES to be marked as to only be
compiled during the PGO generation step.
2018-07-09 18:35:49 -04:00
Mike Hommey
b2837054ff Bug 1469091 - Build the clang plugin as a host shared library. r=ted
This adds just enough host shared library support for this one use case,
but also takes shortcuts, because fully supporting host shared library
is a deep rabbit hole I'm not ready to take just to fix --enable-lto
--enable-clang-plugin on mac builds.

One downside is that one my machine the plugin now takes > 80s to build,
instead of 15s before, thanks to the lack of unified sources.

--HG--
extra : rebase_source : bf52a72a01d4e3eb77cf52b646b19734b9273075
2018-07-05 14:58:09 +09:00
David Major
3438ab8312 Bug 1473954: Use $(ASOUTOPTION) rather than hardcode -o for SOBJS. r=ted 2018-07-06 13:56:50 -04:00
Ted Mielczarek
41895658f3 bug 1473121 - Pass -vv to cargo build instead of just --verbose when verbose output is requested. r=gps
Many Rust build scripts compile C/C++ source files with the cc crate, but
cargo doesn't print the output of build scripts unless you pass `-vv`, so
pass that instead of just `--verbose` to get that output in automation and
builds where verbose output was requested.

MozReview-Commit-ID: EUazlKWFsDw

--HG--
extra : rebase_source : 137882c4e970bb0e7b28cc36d7f8e436b59a8011
2018-07-03 14:17:31 -04:00
Henri Sivonen
5885cf2259 Bug 1397807 - Allow rustc to emit NEON instructions when clang does on ARMv7 and use NEON in encoding_rs. r=glandium
MozReview-Commit-ID: LNd4jeIGIRg

--HG--
extra : rebase_source : e175f51ec3e8c1097d914d97c6b0d2644dbc4c18
2018-06-05 14:56:11 +03:00
Xidorn Quan
9d13707bca Bug 1471486 part 1 - Detect rustfmt like other rust executables. r=froydnj
MozReview-Commit-ID: 8LMdpdqbrFS

--HG--
extra : rebase_source : e23b7e467993963eb1a69637dacdabb7cbff3e90
2018-06-27 15:27:43 +10:00
Mike Hommey
354a9e27a0 Bug 1470127 - Move binary checks to a standalone script. r=froydnj
We perform, on the binaries we build, a series of check, that are
implemented as half-baked make commands, invoked after linking them.

- check libstdc++ symbol versions to ensure binary compatibility with
  a baseline.
- check glibc symbol versions to ensure binary compatibility with a
  baseline.
- check that target binaries don't contain text relocations.
- check that libmozglue is linked before libc on android.
- on libxul, check that NSModules are laid out correctly.
- on libxul, check that there is more than one PT_LOAD segment.

Those checks happen to work where they matter, but their setup is
unreliable. For example, the checks for symbol versions are supposed to
work for libclang-plugin on cross osx builds, but in fact, don't,
because the readelf path doesn't exist, and the command doesn't fail in
that case.

So move them all to a standalone script, performing the checks more
thoroughly (especially the NSModules one, where we now also check that
they are all adjacent), and more verbosely.

--HG--
extra : rebase_source : 7072e622e95f363d4a6c3a8e272d3445d998b592
2018-06-21 18:13:03 +09:00
Chris Manchester
86ddf36acf Bug 1469067 - Build host programs in their final locations rather than copying them to dist/host/bin. r=mshal
MozReview-Commit-ID: BrSou1ee2qV

--HG--
extra : rebase_source : 14ab70086b6b43b026c4ca269f27f0ae20a09aa6
2018-06-18 14:22:20 -07:00
Mike Hommey
8b091c97fd Bug 1464522 - Count static initializers from the crash reporter symbol files. r=froydnj
The crash reporter symbol files are the easiest cross-platform way to
find static initializers. While some types of static initializers (e.g.
__attribute__(constructor) functions) don't appear there in a notable
way, the static initializers we do care the most about for tracking do
(static initializers from C++ globals). As a matter of fact, there is
only a difference of 2 compared to the currently reported count of 125
on a linux64 build, so this is a good enough approximation. And allows
us to easily track the count on Android, OSX and Windows builds, which
we currently don't do.

The tricky part is that the symbol files are in
dist/crashreporter-symbols/$lib/$fileid/$lib.sym, and $fileid is hard to
figure out. There is a `fileid` tool in testing/tools, but it is a
target binary, meaning it's not available on cross builds (OSX,
Android).

So the simplest is just to gather the data while creating the symbol
files, which unfortunately requires to go through some hoops to make it
happen for just the files we care about.

--HG--
extra : rebase_source : 458fed1ffd6f9294eefef61f10ff7a284af0d986
2018-05-29 08:48:47 +09:00
David Major
e02fd9579e Bug 1460020: Filter out PGO flags from cargo's LDFLAGS. r=froydnj 2018-05-11 10:37:55 -04:00
Nick Alexander
00dc996ad3 Bug 1444546 - Post: Remove add_java_jar and support. r=froydnj
MozReview-Commit-ID: J6E2ZOs9r3P

--HG--
extra : rebase_source : 0e68f776e95e0fd2fec4607435d030acc68ca0ad
2018-03-06 14:48:20 -08:00
Xidorn Quan
12ddb6a1e7 Bug 1457524 part 3 - Check rustdoc for rust tests. r=froydnj
MozReview-Commit-ID: 4qRccUcXq6O

--HG--
extra : rebase_source : 684fd08a18f55a1f620fa305b22b31e002077a0a
2018-05-02 20:02:04 +10:00
Xidorn Quan
28f16a3912 Bug 1457524 part 2 - Run all rust tests regardless of failures. r=froydnj
MozReview-Commit-ID: K4ZhFOWd6gd

--HG--
extra : rebase_source : 176ecf1b54e949d2a177f15106dd7a31d158c845
2018-05-02 17:13:25 +10:00
Xidorn Quan
1c8dc43017 Bug 1457524 part 1 - Use a list for rust tests. r=froydnj
MozReview-Commit-ID: 6A0hHClXDUE

--HG--
extra : rebase_source : 827bb569642aa2ad834b94f08af3f60b68552de4
2018-05-02 11:51:25 +10:00
Chris Manchester
df340972e4 Bug 1449965 - Output directories during the build as we compile object files. r=ted
MozReview-Commit-ID: K4RrObGHXIC

--HG--
extra : rebase_source : 09e66caa36cd6bac1d5ac4bbf300ab4ee93fce27
2018-04-19 00:16:57 -07:00
David Major
8cc756f020 Bug 1448378: Fix build and symbols on Windows ASan. r=froydnj
--HG--
extra : rebase_source : 86b0702d54af96ee39ff82e109164cd10a8d138e
2018-03-26 17:07:30 -04:00
Chris Manchester
0a830e8691 Bug 1429875 - Implement OBJ_SUFFIX overriding for the profile generation phase on linux in mozbuild. r=glandium
MozReview-Commit-ID: 8PtgxfbxuE

--HG--
extra : rebase_source : fd8934ee2c70883e30a7b51d4b64944d3ce7e6ee
2018-03-20 16:44:12 -07:00
Chris Manchester
de12a7992b Bug 1429875 - Remove expandlibs and instead generate list files in the mozbuild backend. r=glandium
MozReview-Commit-ID: 5eLwnh1HHGj

--HG--
extra : rebase_source : cd308adc4542be0f9b33b64d31a2d0dc0310fcd4
2018-03-20 16:31:05 -07:00
Chris Manchester
fb59fb974a Bug 1429875 - Do not take DIST_INSTALL into account when deciding to build static libraries. r=glandium
Now that we're no longer shipping the SDK we no longer need real libraries for
the libraries that were created by this rule.

MozReview-Commit-ID: ALATVGBayHu

--HG--
extra : rebase_source : a20905125e5ff1846ef29de12323ba7b0a58928b
2018-03-20 16:31:05 -07:00
Chris Manchester
2cc5f5d9d2 Bug 1255485 - Don't assume target path is srcdir relative when locating a program's manifest on windows. r=ted
MozReview-Commit-ID: L5BVxWGtpeN
2018-03-19 14:07:32 -07:00
Ted Mielczarek
39f62680ca bug 1255485 - force import libraries to be generated in objdir, not dist/bin. r=chmanchester
The MSVC linker winds up generating import libraries when linking some of
our executables, presumably because they contain functions that are
__declspec(dllexport). By default the import libraries get written
alongside the exe, so we force them to be written to the objdir so they don't
clutter up dist/bin.

MozReview-Commit-ID: 7DTfCo3OdDQ
2017-11-27 09:03:31 -05:00
Ted Mielczarek
dcdf597820 bug 1255485 - build PROGRAMs directly in dist/bin instead of copying them. r=nalexander
Historically we built all our binaries in directories in the objdir, then
symlinked them into dist/bin. Some binaries needed to be copied instead
so that certain relative path lookups work properly, so we resorted to
sprinkling `NSDISTMODE=copy` around Makefiles.

This change makes it so we build PROGRAMs (not any other sort of targets)
directly in dist/bin instead. We could do the same for our other targets
with a little more work.

There were several places in the tree that were copying built binaries to
some other place and needed fixup to match the new location of binaries.

On Windows pdb files are left in the objdir where the program was
originally linked. symbolstore.py needs to locate the pdb file both to
determine whether it should dump symbols for a binary and also to copy
the pdb file into the symbol package. We fix this by simply looking for
the pdb file in the current working directory if it isn't present next
to the binary, which matches how we invoke symbolstore.py.

MozReview-Commit-ID: 8TOD1uTXD5e
2018-01-10 14:26:12 -05:00
Nathan Froyd
dfc23d3001 Bug 1437627 - part 2 - move incremental compilation logic to moz.configure; r=chmanchester
Doing checks in Python is much simpler than doing them in Makefile
logic, and we're going to be adding some more complex logic in the next patch.
2018-03-12 12:25:39 -05:00
Nick Alexander
1ff0250889 Bug 1440433 - Part 2: Remove ANDROID_APK_{NAME,PACKAGE}. r=jchen
The last APK produced using the ANDROID_APK_* moz.build/Makefile.in
mechanism was Robocop, so we can get rid of these now.

MozReview-Commit-ID: 9b08ZvvOAoC

--HG--
extra : rebase_source : ac4fea057bf6e731b0f26a1b6902f17a7362076d
2018-02-22 13:36:49 -08:00
Nick Alexander
5ee275d6d3 Bug 1368699 - Post: Remove PURGECACHES from Make and now-unused app-rules.mk. r=gps
Now that writing the .purgecaches sentinel is done by |mach build|, we
can remove it from Make.  In addition, we can cull the now-unused
app-rules.mk \o/

MozReview-Commit-ID: 6CnAqLeZwzB

--HG--
extra : rebase_source : 2a5b67e723f8e1654627e6e6f26704f6a4e57706
2018-01-19 10:50:42 -08:00
Nick Alexander
6729d9a469 Bug 1368699 - Pre: Remove MY_{CONFIG,RULES} Makefile customization hooks. r=gps
I very much doubt these are used, but even if we are -- we shouldn't
support this type of local customization, since it doesn't extend to
non-Make-based backends.

With the customization point removed, there's no way to set ETAGS, so
we remove what little support there was for generating Emacs tags.

MozReview-Commit-ID: IEF2Q4tISEn

--HG--
extra : rebase_source : 3bc8e651c03517edb797032db6ce60ed8852d9fa
2018-01-19 10:43:51 -08:00
Coroiu Cristina
4854a65d8c Backed out 3 changesets (bug 1368699) for bustage on Android L10n nightlies a=backout
Backed out changeset e16fc8abd345 (bug 1368699)
Backed out changeset 35a5db01b6ae (bug 1368699)
Backed out changeset 7297a1e8c4ff (bug 1368699)
2018-01-31 01:59:23 +02:00
Nick Alexander
f6ce1f10e0 Bug 1368699 - Post: Remove PURGECACHES from Make and now-unused app-rules.mk. r=gps
Now that writing the .purgecaches sentinel is done by |mach build|, we
can remove it from Make.  In addition, we can cull the now-unused
app-rules.mk \o/

MozReview-Commit-ID: 6CnAqLeZwzB

--HG--
extra : rebase_source : 7427ca9aecc6619f48090c6a26c9a2e0e7d37bad
2018-01-19 10:50:42 -08:00
Nick Alexander
feb76eb004 Bug 1368699 - Pre: Remove MY_{CONFIG,RULES} Makefile customization hooks. r=gps
I very much doubt these are used, but even if we are -- we shouldn't
support this type of local customization, since it doesn't extend to
non-Make-based backends.

With the customization point removed, there's no way to set ETAGS, so
we remove what little support there was for generating Emacs tags.

MozReview-Commit-ID: IEF2Q4tISEn

--HG--
extra : rebase_source : 140e07f78dbd72391c70c48f25e2b85c924fe78d
2018-01-19 10:43:51 -08:00
Gurzau Raul
bbe856eaf5 Backed out 5 changesets (bug 1255485) for mochitest failures on test/mochitest/test_hangui.xul
Backed out changeset 90b7449882b6 (bug 1255485)
Backed out changeset 5672cf8d324b (bug 1255485)
Backed out changeset ed6dd4aefadb (bug 1255485)
Backed out changeset 0ba36c0feddb (bug 1255485)
Backed out changeset 51af06b6123c (bug 1255485)
2018-01-23 02:01:43 +02:00
Ted Mielczarek
4c95b3dc36 bug 1255485 - force import libraries to be generated in objdir, not dist/bin. r=chmanchester
The MSVC linker winds up generating import libraries when linking some of
our executables, presumably because they contain functions that are
__declspec(dllexport). By default the import libraries get written
alongside the exe, so we force them to be written to the objdir so they don't
clutter up dist/bin.

MozReview-Commit-ID: 7DTfCo3OdDQ

--HG--
extra : rebase_source : fea69e8f60633b824726269c2296af9fe812d3ed
2017-11-27 09:03:31 -05:00
Ted Mielczarek
2a410dbcc3 bug 1255485 - build PROGRAMs directly in dist/bin instead of copying them. r=nalexander
Historically we built all our binaries in directories in the objdir, then
symlinked them into dist/bin. Some binaries needed to be copied instead
so that certain relative path lookups work properly, so we resorted to
sprinkling `NSDISTMODE=copy` around Makefiles.

This change makes it so we build PROGRAMs (not any other sort of targets)
directly in dist/bin instead. We could do the same for our other targets
with a little more work.

There were several places in the tree that were copying built binaries to
some other place and needed fixup to match the new location of binaries.

On Windows pdb files are left in the objdir where the program was
originally linked. symbolstore.py needs to locate the pdb file both to
determine whether it should dump symbols for a binary and also to copy
the pdb file into the symbol package. We fix this by simply looking for
the pdb file in the current working directory if it isn't present next
to the binary, which matches how we invoke symbolstore.py.

MozReview-Commit-ID: 8TOD1uTXD5e

--HG--
extra : rebase_source : 9140be949b206bb595d9188ce7e8357347ecd9a9
2018-01-10 14:26:12 -05:00
Ralph Giles
a9735964e0 Bug 1430886 - Disable incremental rust in automation. r=froydnj
Work around excessive command-line length issues by
disabling incremental rust compilation, which is enabled
by default outside `cargo --release` starting with Rust 1.24.

Incremental rust builds shouldn't help much in automation,
where sccache provides the only continuity between build
environments. In the meantime, they add a lot of object
files to the link line.

See https://github.com/rust-lang/rust/pull/47507 about addressing
the underlying issue upstream.

MozReview-Commit-ID: LRwUj3fhiaO

--HG--
extra : rebase_source : 1739a7570b2e7fe40ead3b301ea20c2fe79f0431
2018-01-17 08:32:51 -08:00
David Major
18a5250f02 Bug 1425906: Rename LINK to LINKER throughout the build system. r=glandium
Windows linkers give special meaning to getenv("LINK"), which makes `export LINK=...` in mozconfigs do unexpected things.
2017-12-20 09:07:46 -05:00
Ting-Yu Chou
a5fdd873e9 Bug 1360650 part 1 - Archive pdb files of the binaries for llvm-symbolizer. r=ted 2017-12-18 11:26:02 -05:00
Mike Shal
6fab321f11 Bug 1319222 - Add include flags to HOST_*; r=chmanchester
This accounts for LOCAL_INCLUDES in the moz.build files, as well as the
default INCLUDES specified in config.mk that are used for host
compilation. Since some of the HOST_CFLAGS were also used for linking,
those flags are split off into HOST_C{XX}_LDFLAGS so that
the linker-only flags can be placed in those variables.

MozReview-Commit-ID: J1LxIZVeFJ

--HG--
extra : rebase_source : ed7293604e5428e3124f1ecfb2b706e087436b72
2017-11-22 16:23:44 -05:00
Mike Shal
b631c0c574 Bug 1319222 - Remove INCLUDES from HOST_SIMPLE_PROGRAMS linking; r=chmanchester
These flags were added way back in bug 59454 to both the compiling and
linking rules for HOST_SIMPLE_PROGRAMS. However, the INCLUDES aren't
actually needed when linking so we can safely remove them.

MozReview-Commit-ID: 8QywO7tGPpU

--HG--
extra : rebase_source : 34870adcf73b459771413e52bc84c6c63669d0f9
2017-12-05 10:36:15 -05:00
Mike Shal
5e5570c9ca Bug 1319222 - Add an SFLAGS ComputedFlags variable for compiling *.S; r=chmanchester
Both SFLAGS and ASFLAGS are used to compile assembly, but SFLAGS include
DEFINES and LOCAL_INCLUDES whereas ASFLAGS do not. It seems easiest to
just separate them into two different ComputedFlags values so that the
backend can distinguish between the two types.

MozReview-Commit-ID: Bkm3621ImJG

--HG--
extra : rebase_source : 420204e37d591512f700d77b780939d20c2feeb0
2017-11-22 15:27:52 -05:00
Chris Manchester
a638887c37 Bug 1414064 - Remove LD_VERSION_SCRIPT from the build system. r=mshal
MozReview-Commit-ID: 6KOLZh6aQmc

--HG--
extra : rebase_source : 9a98d1703e9a3138669bc96afdff66bf235058bc
2017-11-07 14:35:05 -08:00
Chris Manchester
77480a3b4d Bug 1414064 - Move BIN_FLAGS to MOZ_PROGRAM_LDFLAGS, get rid of BIN_FLAGS. r=mshal
MozReview-Commit-ID: ELTiYvh6iuS

--HG--
extra : rebase_source : 1547fa9b247649a485c4d31f8bdb7db05a50e043
2017-11-07 14:34:44 -08:00
Chris Manchester
778f734b4f Bug 1414064 - Remove references to EXTRA_LIBS in the build system. r=mshal
MozReview-Commit-ID: AeD755whvIV

--HG--
extra : rebase_source : f59ecae4225e77cfe748e4b132206f2132247078
2017-11-07 14:34:44 -08:00
Chris Manchester
b9129cf320 Bug 1414064 - Remove SHLIB_LD{START,END}FILE and SUB_SHLOBJS. r=mshal
These are only set by nss' make build system, which we no longer use.

MozReview-Commit-ID: 9XRhpDmlekK

--HG--
extra : rebase_source : 5bff741863a463eca7d72f4e23c1c78e04a848de
2017-11-07 14:34:44 -08:00
Chris Manchester
7fa9f8f217 Bug 1414064 - Remove EXE_DEF_FILE, it is never set in the build system. r=mshal
MozReview-Commit-ID: IcCg4rZjpee

--HG--
extra : rebase_source : 1100d18597709040464c0d82a8b4929cba36537a
2017-11-07 14:34:44 -08:00
Chris Manchester
732b66708f Bug 1414064 - Remove WRAP_LDFLAGS, it is never set in the build system. r=mshal
MozReview-Commit-ID: Da4a4JmaxoL

--HG--
extra : rebase_source : 837e83e6836ea25d64f013b2b16456f9f6bcb88f
2017-11-07 14:34:44 -08:00
Chris Manchester
914e5042b2 Bug 1411712 - Fixup DEFFILE to be added to EXTRA_DEPS on windows when GNU_CC is set. r=mshal 2017-11-02 23:03:01 +01:00
Chris Manchester
8bc7bdf347 Bug 1411712 - Move LDFLAGS to mozbuild. r=mshal
MozReview-Commit-ID: A8cZ2FUveAf

--HG--
extra : rebase_source : 5f0e9b55c38f3b2382b469bbc886c57696f09792
2017-11-02 11:47:48 -07:00
Gregory Szorc
be9770f18d Bug 1412460 - Remove targets related to VCS operations; r=mshal
These targets no longer exist in client.mk. I'm not sure when they
were removed. But this is obviously dead code.

A target in rules.mk pointing back to this target in client.mk has
also been removed.

MozReview-Commit-ID: 5v1MOOTP3qq

--HG--
extra : rebase_source : b90f0788b074330b45005223f41c804589d13163
2017-11-01 15:05:50 -07:00
Chris Manchester
3bd4902247 Bug 1403346 - Move C{XX}FLAGS to mozbuild computed flags. r=glandium
This also introduces C{XX}_LDFLAGS variables which contain cflags that
are meant to be passed to the linker, and adds them to various linker
command lines in place of CFLAGS.

MozReview-Commit-ID: GyKlD9nMqrt
2017-10-25 15:12:09 -07:00