Commit Graph

1404 Commits

Author SHA1 Message Date
Thomas P.
c047fdb3fb Bug 1483780: enable sanitizer-less libfuzzer builds r=froydnj
--HG--
extra : histedit_source : b7caa42560c3d8e7ba1dbf61fcacfe0698790801
2018-09-20 21:21:38 +00:00
Thomas P.
dae33d978b Bug 1483780: enable sanitizer-less libfuzzer builds r=froydnj superreview=decoder
--HG--
extra : histedit_source : 6fd1a37c3fb5d8997be11f7846b2976fc7b8a647
2018-09-11 03:49:37 +00:00
arthur.iakab
e38cbc2831 Merge mozilla-central to autoland 2018-09-19 05:20:02 +03:00
Adam Gashlin
fc13e0055e Bug 1492268: Allow a Rust library to link to a program r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D6200

--HG--
extra : moz-landing-system : lando
2018-09-18 22:23:41 +00:00
Ted Mielczarek
115b2651d5 Bug 1490463 - part 3 - remove BUILD_TOOLS from config.mk; r=mshal
BUILD_TOOLS was only ever used for things that another variable provides
equally well.  Removing BUILD_TOOLS means that we can remove win_srcdir
and WIN_TOP_SRC as well.
2018-09-18 16:02:22 -04:00
Ted Mielczarek
90962198d5 Bug 1490463 - part 2 - use srcdir_rel for passing manifest paths to mt.exe; r=mshal
mt.exe doesn't like absolute paths, so we use srcdir-relative paths
where necessary for file arguments.
2018-09-18 16:02:22 -04:00
Ted Mielczarek
de99592416 Bug 1399870 - make DEFFILE a Path instead of a string; r=gps
All but one of the current uses of DEFFILE use `SRCDIR + '/file.def'` to
get a srcdir-relative path anyway, and the other one wants an
objdir-relative path, so using Path makes everything clearer.

This makes it more straightforward to translate the paths for the WSL
build.
2018-09-18 15:50:19 -04:00
Thomas P.
ac7fc2f5a6 Bug 1474488: add --enable-undefined-sanitizer with custom checks r=froydnj 2018-09-11 02:47:23 +00:00
Masatoshi Kimura
0fecbaf0bc Bug 1485224 - Workaround a linker bug of MSVC 2017 Update 8. r=glandium
MSVC 15.8 linker dislikes forward slashes in the /OUT: parameter when it is generating a profile

--HG--
extra : rebase_source : 6980e212ea5a7ae21513805c22ec0e8ddeaa5dc1
2018-08-28 23:41:39 +09:00
Margareta Eliza Balazs
f79a9159ca Backed out 2 changesets (bug 1485224) for perma bc3 failures e.g.: Error getting fileid for Z:\task_1536750533ad] WARNING: NS_ENSURE_TRUE CLOSED TREE
Backed out changeset fe2c607f4af7 (bug 1485224)
Backed out changeset f7a6e536532e (bug 1485224)
2018-09-12 15:37:19 +03:00
Masatoshi Kimura
57028ccb18 Bug 1485224 - Workaround a linker bug of MSVC 2017 Update 8. r=glandium
MSVC 15.8 linker dislikes forward slashes in the /OUT: parameter when it is generating a profile

--HG--
extra : source : d0098304d5b1a35446781d60a9050d310b45f5bd
2018-08-28 23:41:39 +09:00
Margareta Eliza Balazs
e620c683cb Backed out 2 changesets (bug 1474488) for causing failures in build/src/obj-firefox/dist/include/mozilla/Assertions.h CLOSED TREE
Backed out changeset ffce46424c69 (bug 1474488)
Backed out changeset e4b9fa5f7592 (bug 1474488)
2018-09-11 10:59:28 +03:00
Thomas P.
357f9deb02 Bug 1474488 - add --enable-undefined-sanitizer with custom checks. r=froydnj 2018-09-11 02:47:23 +00:00
Gurzau Raul
09fe34b331 Merge inbound to mozilla-central. a=merge 2018-08-31 00:49:36 +03:00
Myk Melez
7978cd2fe4 Bug 1482810 - set COMPILE_FLAGS var to hide warnings for Rust crates r=chmanchester
In conjunction with the cc crate changes in https://github.com/alexcrichton/cc-rs/pull/342 (which I'll land in https://phabricator.services.mozilla.com/D4699), this hides warnings generated by C code in Rust crates (by removing warnings flags from CFLAGS when compiling Rust libraries).

MozReview-Commit-ID: 9CZgLGbWjbA

Differential Revision: https://phabricator.services.mozilla.com/D3939

--HG--
extra : moz-landing-system : lando
2018-08-30 17:29:54 +00:00
Tom Ritter
777ed8fb73 Bug 1483760 Additionally, pass environment variables to cargo if we are not compiling on Windows r=ted
Previously we weren't passing the variables if we were compiling for Windows
when really we only want to do it if we're compiling with MSVC/clang-cl.

The MinGW-Clang build needs this.

Differential Revision: https://phabricator.services.mozilla.com/D3470

--HG--
extra : moz-landing-system : lando
2018-08-22 11:11:11 +00:00
Marco Castelluccio
38495beeb7 Bug 1478969 - Don't apply RUSTFLAGS defined in mozconfig when building host Rust libraries and programs. r=froydnj
--HG--
extra : rebase_source : ba34d715409f6975c69d9259315cb5735d5e9ce6
extra : intermediate-source : 93e52a1e5d88d169fca83b1f8e9f0eb78d809cc9
extra : source : fe49224aa15b580499b4b52731622de628ec5c0e
2018-07-27 01:26:20 +01:00
Andreea Pavel
cfb3691ea0 Backed out changeset 93e52a1e5d88 (bug 1478969) for linux tier2 rust build bustages on a CLOSED TREE 2018-08-21 22:09:33 +03:00
Marco Castelluccio
d2512b7192 Bug 1478969 - Don't apply RUSTFLAGS defined in mozconfig when building host Rust libraries and programs. r=froydnj
--HG--
extra : rebase_source : 55fe4f4abf5a62b0c5dc78a380136fc085ab27c2
extra : source : fe49224aa15b580499b4b52731622de628ec5c0e
2018-07-27 01:26:20 +01:00
Nathan Froyd
684e72b2ab Bug 1486905 - add a HOST_LINKER variable for cross windows builds; r=dmajor
This setup seems to work well enough to enable me to link
HOST_SIMPLE_PROGRAMS with an AArch64-cross setup.  Necessary library
paths are passed to the linker via -LIBPATH and HOST_LDFLAGS rather than
letting MSVC fish them out of the environment.  The change to
HOST_SIMPLE_PROGRAMS to pass HOST_LDFLAGS was necessary for this to
work, in addition to the HOST_LINKER changes.
2018-08-30 10:28:15 -04:00
Nathan Froyd
562477257c Bug 1481504 - fix HOST_OUTOPTION setting for Windows cross-compiles; r=mshal
For "real" Windows-to-Windows cross compiles, the setting of
HOST_OUTOPTION is incorrect: it assumes that if we are cross-compiling,
we'll be using `-o ` (GNU-style) rather than `-Fo` (MSVC-style).  Our
normal x86 Windows automation builds are technically not
cross-compiles (host and target are both x86 Windows), so this case has
never bothered us before.  But when compiling for AArch64 Windows, we
are really doing a cross-compile, and so we need to be more careful
about how we set this option; otherwise, host compilations will
mysteriously fail because they won't produce any output.
2018-08-20 17:22:44 -04:00
Tom Ritter
4070649de2 Bug 1481638 Do not pass CFI sanitization flags to MOZ_CARGO_WRAP_LDFLAGS r=ted
MozReview-Commit-ID: C85uJBNugiY

Differential Revision: https://phabricator.services.mozilla.com/D3044

--HG--
extra : moz-landing-system : lando
2018-08-13 15:45:12 +00:00
Chris Manchester
c346a68ae0 Bug 1474028 - Add a way to exclude libraries from the default build. r=ted
MozReview-Commit-ID: MVfplx9lN2

--HG--
extra : rebase_source : 10b4bd3dcc1386d782531206c84b66207297d00a
2018-08-10 12:07:29 -07:00
Narcis Beleuzu
f4e5fb2d0f Backed out 2 changesets (bug 1474028) per chmanchester`s request. a=backout
Backed out changeset 52bd814d3589 (bug 1474028)
Backed out changeset 39a528147c34 (bug 1474028)
2018-08-12 21:22:45 +03:00
Chris Manchester
2476269229 Bug 1474028 - Add a way to exclude libraries from the default build. r=ted
MozReview-Commit-ID: MVfplx9lN2

--HG--
extra : rebase_source : 3eb5352b5bc0d1b9be857c16efa5af0313afb6e7
2018-08-10 12:07:29 -07:00
Aaron Klotz
06d15feb59 Bug 1481956: Allow SIMPLE_PROGRAMS to embed manifest from source directory; r=froydnj
--HG--
extra : amend_source : ecd475bd4abfe5318f715c140c7ced0d8b56229a
2018-08-08 16:16:35 -06:00
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