Граф коммитов

6372 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey 733dc0bf95 Bug 1389422 - Avoid @GLIBCXX_3.4.22 symbols from the use of std::thread when building with GCC 6. r=froydnj
That the wrapper implementation works has been verified by creating a
dummy program such as:

  $ cat test.cc
  #include <thread>

  int main() {
    std::thread([]() {
      printf("foo\n");
    }).join();
    return 0;
  }

And compiling it with and without the hack:

  $ g++ -fno-rtti -o test test.cc -lpthread
  $ objdump -TC test | grep UND.*GLIBCXX_3.4.22
  0000000000000000      DF *UND*	0000000000000000  GLIBCXX_3.4.22 std:🧵:_State::~_State()
  0000000000000000      DF *UND*	0000000000000000  GLIBCXX_3.4.22 std:🧵:_M_start_thread(std::unique_ptr<std:🧵:_State, std::default_delete<std:🧵:_State> >, void (*)())

  $ ./test
  foo

  $ g++ -fno-rtti -o test test.cc $objdir/build/unix/stdc++compat/stdc++compat.o -lpthread
  $ objdump -TC test | grep UND.*GLIBCXX_3.4.22
  $ ./test
  foo

--HG--
extra : rebase_source : 53ca8e2d0424eaeb539d50510c441c8a3252c819
2017-08-11 17:20:47 +09:00
Wes Kocher 2458d6b297 Merge m-c to autoland, a=merge
MozReview-Commit-ID: KfZgcCxrZcg
2017-08-14 17:59:46 -07:00
Tristan Bourvon 5dba5275b8 Bug 1390064 - Fix IgnoreTrivials in Utils.h by changing cast to cast_or_null r=mystor
MozReview-Commit-ID: E1uMaMRrCuO

--HG--
extra : amend_source : 813d6f884ccb1736ee161d8cedce260a0a7a2a90
2017-08-14 11:40:36 +02:00
Gregory Szorc 80d6e033a7 Bug 1385381 - Detect and expose Python 3 to the build system; r=chmanchester
Various people want to start experimenting with Python 3 in the build
system and in related tools (like mach).

We want to make it easy to find and use an appropriate Python 3
binary.

This commit introduces a generic function for finding a Python 3
binary and resolving its version.

We use the new code in configure to set PYTHON3 and PYTHON3_VERSION
subst entries for later consultation.

We also expose a cached attribute on the base class used by many
mach and build system types to return a Python 3 executable's info.

By default, we only find Python 3.5+. From my experience, Python 3.5
was the first Python 3 where it was reasonable to write code that
supports both Python 2 and 3 (mainly due to the restoration of the
% operator on bytes types). We could probably support Python 3.4
in the build system. But for now I'd like to see if we can get
away with 3.5+.

MozReview-Commit-ID: BlwCJ3kkjY9

--HG--
extra : rebase_source : b00464972183ef1a97a0b5d888520be425717ae7
2017-07-27 21:19:25 -07:00
J. Ryan Stinnett 79915f9599 Bug 1365915 - Add Valgrind suppressions for Stylo. r=jseward
MozReview-Commit-ID: 8XrPy6ovbm7
2017-08-14 12:53:23 -05:00
Matt Brubeck 503070ad8d Bug 1386371 - Disable LTO by default, but enable in automation. r=froydnj
MozReview-Commit-ID: 2DIY9ex3Mch

--HG--
extra : rebase_source : 61f2f073adabfa7c46c324470a308adab23e7781
2017-08-10 11:38:10 -07:00
Sylvestre Ledru fa1440cf47 bug 1320656 - When exists, add -Wno-noexcept-type to the js build flags until we have a proper fix r=glandium
MozReview-Commit-ID: HeDMTxopx9V

--HG--
extra : rebase_source : a48fbfcd687d44ffe16be39f5c5e945d8df31b17
2017-08-11 10:46:02 +02:00
Wes Kocher cff9e9b197 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 2YvHbITn9w3
2017-08-10 18:25:34 -07:00
Julian Seward e714eb3dea Bug 1382280 - Update the version of Valgrind in the desktop-build image to one with unstripped shared libraries (part 3). r=n.nethercote.
This patch:

* Adds a suppression for some leaks in libLLVM-3.6-mesa.so.

* Adds Valgrind flag --keep-debuginfo=yes so that the abovementioned leak
  stacks can be symbolised and hence suppressed even after
  libLLVM-3.6-mesa.so is unmapped from the process.

* Adds Valgrind flag --expensive-definedness-checks=yes as an attempt to
  reduce Memcheck false positives from LLVM and rustc compiled code.  This
  change is aimed primarily at bug 1365915.

MozReview-Commit-ID: KiOZG2O8wzs
2017-08-07 11:49:28 +02:00
Wander Lairson Costa 285b4dbffb Bug 1382280 part 1: Upgrade valgrind r=ted
Bug 1338651 was backed out because when building a newer image, there
was a valgrind leak report that couldn't resolve symbols. Further
investigation showed the valgrind package installed had symbols stripped.

We upgrade valgrind version and build it from source with symbols.

We had to build inside the docker image because we need to run
"make install". Using "make dist" to generate a tar ball will also run
"make docs", and it is hard to make it work because of the outdated
texlive package present in CentOS 6.

We also apply a patch [1] to valgrind correctly generate symbols
for unloaded objects.

[1] https://bugs.kde.org/show_bug.cgi?id=79362#c62

MozReview-Commit-ID: 2IhuJY28Ke3
2017-08-10 13:42:11 -03:00
Sebastian Hengst 51d351f567 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-08-10 17:41:11 +02:00
Kris Maglione 9cc6707daf Bug 1350646: Part 1 - Remove addon-sdk moz.build generation gunk. r=Mossop
MozReview-Commit-ID: GMlOFoosVQZ

--HG--
extra : source : 67c251e2c9db1d42a8de6d09a44e9e2f7be084a4
2017-08-02 13:51:40 -07:00
Phil Ringnalda ca2c01b0ad Backed out 22 changesets (bug 1350646) for talos damp failures
Backed out changeset c3108aebee35 (bug 1350646)
Backed out changeset ee8f7fa9d410 (bug 1350646)
Backed out changeset 79e77c06ff44 (bug 1350646)
Backed out changeset 5584fdcd2ee0 (bug 1350646)
Backed out changeset 7571b064a77e (bug 1350646)
Backed out changeset 7f65323c56f9 (bug 1350646)
Backed out changeset 10bbf7c53afe (bug 1350646)
Backed out changeset e40544ead983 (bug 1350646)
Backed out changeset 5eb77e6de0a3 (bug 1350646)
Backed out changeset 6d9244a8ac40 (bug 1350646)
Backed out changeset 13110c98b0fd (bug 1350646)
Backed out changeset 096ff315b48b (bug 1350646)
Backed out changeset 57500d9ea832 (bug 1350646)
Backed out changeset 5a45d9e25a00 (bug 1350646)
Backed out changeset e931e4ff5e11 (bug 1350646)
Backed out changeset d914c050c965 (bug 1350646)
Backed out changeset 35c4d4cd77c7 (bug 1350646)
Backed out changeset 7687db575011 (bug 1350646)
Backed out changeset c68367bb0eb3 (bug 1350646)
Backed out changeset 3ca040743aeb (bug 1350646)
Backed out changeset 8d4c2f001354 (bug 1350646)
Backed out changeset 67c251e2c9db (bug 1350646)

MozReview-Commit-ID: GLM80BkVx85
2017-08-09 20:03:17 -07:00
Mike Hommey ccd43013f6 Bug 1388713 - Change how elfhack looks for the bss section. r=froydnj
In bug 635961, elfhack was made to (ab)use the bss section as a
temporary space for a pointer. To find it, it scanned writable PT_LOAD
segments to find one that has a different file and memory size,
indicating the presence of .bss. This usually works fine, but when
the binary is linked with lld and relro is enabled, the end of the
file-backed part of the PT_LOAD segment containing the .bss section
ends up in the RELRO segment, making that location read-only and
subsequently making the elfhacked binary crash when it tries to restore
the .bss to a clean state, because it's not actually writing in the .bss
section: lld page aligns it after the RELRO segment.

So instead of scanning PT_LOAD segments, we scan for SHT_NOBITS
sections that are not SHF_TLS (i.e. not .tbss).

--HG--
extra : rebase_source : f18c43897fd0139aa8535f983e13eb785088cb18
2017-08-10 07:55:55 +09:00
Sylvestre Ledru 77b71da58c Bug 1336978 - Add support of lld by adding a configure option --enable-linker='bfd', 'gold', 'lld', 'other' r=glandium
MozReview-Commit-ID: 7LI2lMXO2lG

--HG--
extra : rebase_source : d8531917f81e8f6e313b362ae182540312a5c676
2017-07-26 15:14:07 +02:00
Kris Maglione 9172d0a257 Bug 1350646: Part 1 - Remove addon-sdk moz.build generation gunk. r=Mossop
MozReview-Commit-ID: GMlOFoosVQZ

--HG--
extra : rebase_source : c4d52796531c12e136b47313c8ea614b8698fa66
2017-08-02 13:51:40 -07:00
Wes Kocher 223f322400 Merge m-c to autoland a=merge
MozReview-Commit-ID: 2qLtb79Nlhs
2017-08-08 15:26:30 -07:00
Tristan Bourvon cdc988e24a Bug 1374024 - apply clang-format on some files from static analysis. r=mystor
MozReview-Commit-ID: COh2u6PIeY
2017-07-13 12:00:06 +02:00
Tristan Bourvon 2e77c99160 Bug 1374024 - add checker to prevent dangling pointers returned by method calls on temporaries. r=mystor
MozReview-Commit-ID: 9khNt59ONF
2017-07-05 16:14:21 +02:00
Paul Adenot da39c08e8c Bug 1384655 - Backed out changeset 7829ceaaec31 for busting gUM on some configurations.
MozReview-Commit-ID: DSr6uAMzVxq

--HG--
extra : amend_source : 12e63146939d93f97cc31b3588187c234639de99
2017-08-08 09:50:07 +02:00
J. Ryan Stinnett 7bc9824a4f Bug 1363976 - Suppress global_style_data for LSAN. r=bholley
Suppress leaks for allocations where any stack frame matches the string
style::gecko::global_style_data.  This could be dangerous if someone were to
allocate non-global things with this on the stack, but hopefully that can be
avoided, given the name of the module.

MozReview-Commit-ID: 65HpUGsgPPM

--HG--
extra : rebase_source : 19ba5a5001de65628acdb0433341d14429e4af67
2017-08-07 19:55:51 -05:00
Carsten "Tomcat" Book 546b19363f Backed out changeset 514cf1f55c6f (bug 1380639) 2017-08-07 13:23:35 +02:00
Nathan Froyd 6b3217da7f Bug 1385276 - move PROFILE_*FLAGS to moz.configure; r=mshal
We are guaranteed to use a GCC or clang new enough that we don't have to
bother checking whether the flags are supported or not.
2017-08-04 13:56:38 -04:00
Nathan Froyd ff612fa73f Bug 1387185 - remove --enable-b2g-* options from moz.configure whitelist; r=mshal
These options do not exist in the old configure.
2017-08-04 13:56:38 -04:00
Nathan Froyd 26eec13ba0 Bug 1387185 - remove --enable-png-arm-neon-support from moz.configure whitelist; r=mshal
This option does not exist in the old configure.
2017-08-04 13:56:38 -04:00
Nathan Froyd 3a8877d401 Bug 1387185 - remove --enable-safe-browsing option from moz.configure whitelist; r=mshal
This option does not exist in the old configure.
2017-08-04 13:56:38 -04:00
Nathan Froyd d7190c617c Bug 1387185 - remove --enable-url-classifier configure option; r=mshal
Nothing uses the corresponding defines and substs.
2017-08-04 13:56:38 -04:00
Nathan Froyd 51495a8284 Bug 1387185 - remove --disable-mozril-geoloc configure option; r=mshal
Nothing uses the defines and substs that it sets, and no in-tree
mozconfigs pass it as an option.
2017-08-04 13:56:38 -04:00
Sebastian Kaspari b05b8a9729 Bug 1380639 - Add contraint-layout and constraint-layer-solver dependencies. r=mcomella
MozReview-Commit-ID: AbZLlwdDHRV

--HG--
extra : rebase_source : d4538afeca26349512f8453db4782be2bce28ee0
2017-07-25 10:12:38 +02:00
Makoto Kato d2130a3810 Bug 1386164 - Part 2. Use MOZ_SYSTEM_LIBEVENT for webrtc. r=jesup
GYP of WebRTC should reference MOZ_SYSTEM_LIBEVENT values if available.

MozReview-Commit-ID: CshsPrRidM8

--HG--
extra : rebase_source : 9e619c2f49e7c2b3f680814b95b823996773fa6c
2017-08-03 13:28:25 +09:00
Wes Kocher db7d003ae0 Merge m-c to autoland a=merge CLOSED TREE
MozReview-Commit-ID: Ko3lhAvzMJN
2017-08-03 18:22:09 -07:00
Wes Kocher 2196b718d3 Merge inbound to central, a=merge
MozReview-Commit-ID: DlSLhaepjeU
2017-08-03 18:06:53 -07:00
Mike Hommey 118fd76cf0 Bug 1356926 - Make all stdc++compat symbols weak. r=froydnj
In some cases, we can end up linking some things with
--static-libstdc++. The notable (only?) example of that is for the
clang-plugin, and that happens because it gets some of its flags from
llvm-config, which contains --static-libstdc++ because clang itself is
built that way.

When that happens, the combination of --static-libstdc++ and
stdc++compat breaks the build because they have conflicting symbols,
which is very much by design.

There are two ways out of this:
- avoiding either -static-libstdc++ or stdc++compat
- work around the symbol conflicts

The former is not totally reliable ; we'd have to accurately determine
if we're in a potentially conflicting case, and remove one of the two in
that case, and while we can do that for the cases we explicitly know
about, that's not future-proof, and might fail just as much in the
future.

So we go with the latter. The way we do this is by defining all the
std++compat symbols weak, such that at link time, they're overridden by
any symbol with the same name. When building with -static-libstdc++,
libstdc++.a provides those symbols so the linker eliminates the weak
ones. When not building with -static-libstdc++, the linker keeps the
symbols from stdc++compat. That last assertion is validated by the
long-standing CHECK_STDCXX test that we run when linking shared
libraries and programs.

That still leaves the symbols weak in the final shared
libraries/programs, which is a change from the current setup, but
shouldn't cause problems because when using versions of libstdc++.so
that do provide those symbols, it's fine to use the libstdc++.so version
anyways.
2017-08-04 06:07:42 +09:00
Ralph Giles 2a2cfd92f6 Bug 1383311 - Require rust 1.19.0. r=froydnj,gps
Bump the minimum required version of the Rust toolchain to
the current stable release so we can take advantage of new
features.

Highlights of the 1.19.0 release:

* C-compatible `union` (untagged enums).
* Support for Visual Studio 2017.
* Non-capturing closures can be coerced to `fn` bindings.
* Numeric field names in tuple struct initializers.
* Higher macro recursion limit.
* `break` can return a value from `loop` expressions.
* Better error handling with mis-configured Visual Studio environments.

This change also enables 1.18.0 features. Some highlights:

* `pub(mod)` &c. for better control of symbol visibility.
* struct packing for better memory footprint in generated code.
* Faster build times.

MozReview-Commit-ID: 2OpUjAcytpE

--HG--
extra : rebase_source : 2ed0d7c4e7b78c26f7a7476e7b284bf1bdbe7c8b
2017-07-24 07:51:57 -07:00
Axel Hecht d112ca24fa bug 1370506, update the docs, r=glandium
Mostly removals, but also adding docs on how to create a
multilingual package right now.

I think I'd like to take another pass at those docs in a follow-up.

MozReview-Commit-ID: Dkw4MJ5DLyb

--HG--
extra : rebase_source : 4f79499e376cf6ddd23169a1c4525ed6b551a740
2017-06-16 13:14:28 +02:00
Mike Hommey f548b4a8d4 Bug 1386588 - Always print out the commands run by the clang build job. r=gps,a=KWierso
Not doing so makes debugging harder, for no added value.
2017-08-03 08:14:02 +09:00
Mike Hommey cf23b5a7fa Bug 1386588 - Add a toolchain job for Clang 4. r=gps 2017-08-03 08:13:07 +09:00
Mike Hommey 614312f061 Bug 1386588 - Change the GCC build script to be future-proof. r=gps
It becomes a library of some sort, so that multiple scripts can benefit
from it to build different versions of GCC.

The GPG key associated with GCC is also refreshed from keys.gnupg.net,
adding a new subkey, used to sign newer versions of GCC (and
postprocessed with pgpstrip to make it smaller).
2017-08-03 08:12:47 +09:00
Mike Hommey c15ef2edff Bug 1386588 - Rename the linux64-clang and linux64-gcc jobs to include a version number. r=gps
We're soon going to build multiple versions of clang and gcc for linux,
and we need to differentiate them. Furthermore, there is a need for the
base-toolchains builds to use a fixed version of clang and gcc. So
rename the clang and gcc toolchain jobs to include their version, add
aliases to satisfy all existing jobs, and adjust the base-toolchains
jobs to use the explicit version.


--HG--
rename : build/build-clang/clang-linux64.json => build/build-clang/clang-3.9-linux64.json
rename : taskcluster/scripts/misc/build-gcc-linux.sh => taskcluster/scripts/misc/build-gcc-4.9-linux.sh
2017-08-03 08:12:43 +09:00
Mike Hommey ee6de1e835 Bug 1386588 - Rename the clang build manifests. r=gps
The clang toolchains have not been static-analysis-specific for a while.


--HG--
rename : build/build-clang/clang-static-analysis-linux64.json => build/build-clang/clang-linux64.json
rename : build/build-clang/clang-static-analysis-macosx64.json => build/build-clang/clang-macosx64.json
rename : build/build-clang/clang-static-analysis-win32.json => build/build-clang/clang-win32.json
rename : build/build-clang/clang-static-analysis-win64.json => build/build-clang/clang-win64.json
2017-08-03 08:12:29 +09:00
Sylvestre Ledru 6e1f2d507b Bug 1385910 - In the error message, also ask to upload the pre-elfhacked library r=froydnj
MozReview-Commit-ID: A7ADGyQunjN

--HG--
extra : rebase_source : fac3410f828871b5b694851f99bdf588b67f0ef8
2017-07-31 16:35:03 +02:00
Mike Hommey 48eba8560c Bug 1385783 - Insert the elfhack code before the first executable section. r=froydnj
The lld linker creates separate segments for purely executable sections
(such as .text) and sections preceding those (such as .rel.dyn). Neither
gold nor bfd ld do that, and just put all those sections in the same
executable segment.

Since elfhack is putting its executable code between the two relocation
sections, it ends up in a non-executable segment, leading to a crash
when it's time to run that code.

We thus insert the elfhack code before the first executable section
instead of between the two relocation sections (which is where the
elfhack data lies, and stays).

--HG--
extra : rebase_source : ab18eb9ac518d69a8639ad0e785741395b662112
2017-08-02 16:39:12 +09:00
Mike Hommey a2b46623f9 Bug 1385783 - Don't assume both elfhack sections are next to each other. r=froydnj
--HG--
extra : rebase_source : 989e0233f5c80c61680ad4578ea6bd835d231655
2017-08-02 16:05:07 +09:00
Cameron McCormack 66d005a1e5 Bug 1385537 - Check for writable segments correctly. r=glandium
MozReview-Commit-ID: FItpvVeiMJM

--HG--
extra : rebase_source : e9eaeba92967c1e839667fb0597fd0cd8a9616a8
2017-07-29 13:56:25 +08:00
Nick Alexander 6e4a13fad8 Bug 1376306 - Bootstrap and upload java_home.tar.xz; bump Java to 1.8. r=dustin,sebastian
MozReview-Commit-ID: 3EOsrOp924f

--HG--
rename : taskcluster/scripts/misc/repackage-jdk-centos.sh => taskcluster/docker/android-gradle-build/bin/repackage-jdk-centos.sh
extra : rebase_source : 308d03828a78036076f6cdb68587be6694ac49ae
2017-07-25 20:43:14 -07:00
Mike Hommey a15c6351cb Bug 1385117 - Make the bss section of the elfhack testcase large enough. r=froydnj
Since bug 635961, building with relro makes elfhack try to use the bss
data for a temporary function pointer. If there is not enough space for
a pointer in the bss, elfhack will complain it couldn't find the bss.

In normal circumstances, this is most likely fine. Libraries with a bss
so small that it can't fit a pointer are already too small to be
elfhacked anyways. In Firefox, the two libraries with the smallest bss
have enough space for two pointers, and aren't elfhacked (libmozgtk.so
and libplds4.so).

However, the testcase that is used during the build to validate that
elfhack works doesn't have a large enough bss on x86-64, making elfhack
bail out, and the build fail as a consequence.

This, in turn, is due to the only non-thread-local zeroed data being an
int, which is not enough to fit a pointer on x86-64. We thus make it a
size_t.

--HG--
extra : rebase_source : bca2ddbf9d4a5e8786881fc524d642c38d610227
2017-07-28 07:15:39 +09:00
Gregory Szorc 3eae4bab54 Bug 1384396 - Detect Watchman Mercurial integration in configure; r=nalexander
Configure now detects VCS info. Configure now detects Watchman.
We can combine the two so configure can detect if Mercurial
is configured with Watchman enabled.

This commit does two things:

1) collects the Mercurial config so it is available to downstream checks
2) examines the config for presence and state of the fsmonitor
   extension

We don't yet do anything with the fsmonitor state. But it should be
useful soon. Also, the return value is kinda wonky. This will almost
certainly be improved as soon as there is an actual consumer.

MozReview-Commit-ID: HyHZ2X8VI0h

--HG--
extra : rebase_source : e53928127470340275f0c0f07db72b536bba885b
extra : source : a8373914cbfd9b8595fc24f36c876cab0a26c02a
2017-07-27 14:12:35 -07:00
Gregory Szorc f6426ce5ad Bug 1384396 - Add a @depends_all utility function; r=nalexander
Often you only want to evaluate a function if all its dependencies
are true. Expressing this in a "when" can be difficult. So let's
add a convenience decorator for it.

The existing code for @depends_if() was refactored to take an
evaluation function as its first argument. This prevents some
duplicate code and turns @depends_if() and @depends_all() into
one-liners.

MozReview-Commit-ID: Jbugvf0lioM

--HG--
extra : rebase_source : 177741b80ac4fbfb547d6b36a6f5777fe514d91a
extra : source : 0c2bc12f4ebe44428385745266d2fd158e0c3382
2017-07-25 22:00:38 -07:00
Ralph Giles c7c885bcbe Bug 1384258 - Build Stylo by default. r=chmanchester
Build Stylo (the styling system from servo) by default in all
builds for win32, win64, macOS and linux64 targets. It was
previously enabled for automation builds, so this just changes
the behaviour for local developer builds.

Note that this introduces a new dependency on libclang for the
binding generator. If you're developing on a tier-1 platform,
run `./mach boostrap` to install a working copy. Otherwise
llvm+libclang 4.0.1 is recommended.

Remove the explicit --enable-stylo=build in mozconfig.stylo
in favour of the configure default.

Add mozconfig.stylo to the hazard and debug-asan mozconfigs
so LLVM_CONFIG is defined properly for those builds.

Based on a patch by Bobby Holly in bug 1356991.

MozReview-Commit-ID: C2wRNl7JHpz

--HG--
extra : rebase_source : 1ed7c36a64e25b235a26864592cd7ea969a4cd25
2017-07-25 14:29:52 -07:00
Paul Adenot a7e37160fa Bug 1384655 - Don't compile Alsa support in WebRTC on Linux. r=dminor
MozReview-Commit-ID: JtppIlCEiPn

--HG--
extra : rebase_source : 9ddc63c8bd3e93c3627c6c51b96f9021a7064b56
2017-07-27 12:05:19 +02:00