Commit Graph

584 Commits

Author SHA1 Message Date
Nathan Froyd
b38d89886c Bug 1325632 - part 2 - don't warn about c++98/c++11 compatibility problems; r=ted.mielczarek
We're going to compile with C++14 and we don't plan to go back.
2017-11-15 14:53:17 -04:00
Nathan Froyd
ade9d452f7 Bug 1412983 - part 6 - compile headers for cross-compilers during configure; r=ted.mielczarek
Our toolchain detection logic checks whether we can reuse the target
C (resp. C++) compiler for the host compiler.  This is generally only
applicable in the not-cross-compiling case, but we had special logic to
check for clang in the cross-compiling case and accept it, as clang is
able to generate code for multiple architectures from a single compiler
binary.

Our recent switch to clang on Android has exposed a problem in this
logic: we would never check whether the target clang, compiling for the
host, could actually find the host's headers.  This was especially
problematic on OS X hosts, where the host clang contains special logic
to grovel inside the XCode installation to find C++ headers.  The clang
from the NDK, however, was ignorant of the XCode installation.
Therefore, the NDK clang would happily compile code for the host, even
including C headers for the host, but would be hopelessly lost when it
came to compiling C++ headers during the actual build.

In hopes of mitigating this, we now include a check for a representative
header for C and C++ when checking compilers for each of those
languages.  This check will detect such problems as the above, and will
also alert people to potentially misconfigured compilers in other
situations.

We need to modify our test framework to cope with headers being
included, since our mock environment isn't actually equipped with a full
set of compilers and headers.
2017-11-15 10:12:22 -05:00
Nathan Froyd
fd5e1affd1 Bug 1412983 - part 5 - remove stlport_cppflags dependency from bindgen_cflags_defaults; r=ted.mielczarek
Now that extra_toolchain_flags includes stlport_cppflags, there's no
reason bindgen_cflags_defaults should depend on them both.  So remove
the stlport_cppflags dependency.  (There's no harm to multiply-including
stlport_cppflags, but not repeating -I options is good practice.)
2017-11-15 10:12:22 -05:00
Nathan Froyd
e18f985bb2 Bug 1412983 - part 4 - make extra_toolchain_flags depend on stlport_cppflags; r=ted.mielczarek
extra_toolchain_flags is used for compiling target-specific bits of code
elsewhere in configure.  Very shortly, we'll need to compile bits of
code that depend on the C++ standard library, so we'll want to point the
compiler at the C++ standard library.  Making extra_toolchain_flags
include stlport_cppflags is the best way to do that.
2017-11-15 10:12:22 -05:00
Nathan Froyd
e03872a402 Bug 1412983 - part 3 - move stlport_cppflags prior to extra_toolchain_flags; r=ted.mielczarek
extra_toolchain_flags is going to depend on stlport_cppflags
momentarily, so this commit is just for moving code around.  Note that
the diff shows other things moving *after* stlport_cppflags.
2017-11-15 10:12:23 -05:00
Nathan Froyd
741ca70abc Bug 1412983 - part 2 - use extra_toolchain_flags for computing bindgen flags; r=ted.mielczarek
We compute the same set of data in extra_toolchain_flags as we were
computing in bindgen_cflags_defaults.  We might as well reuse the former
to compute the latter.
2017-11-15 10:12:23 -05:00
Nathan Froyd
c9224d1d2e Bug 1412983 - part 1 - convert stlport_cppflags to return a list; r=ted.mielczarek
A list is a better format for these options, and we'll want a list later
when we use the options as compilation flags.
2017-11-15 10:12:23 -05:00
Noemi Erli
550148ab69 Merge inbound to mozilla-central r=merge a=merge 2017-11-15 11:57:12 +02:00
Chris Manchester
8055730c30 Bug 1416490 - Ensure environment variables that are configure options are passed from configure to old-configure. r=glandium
MozReview-Commit-ID: GFP8bahu1bb

--HG--
extra : rebase_source : 1ff35a8b6470308b71dc74c2befb8219a41534c2
2017-11-13 23:33:35 -08:00
Chris Manchester
2473770fb6 Bug 1416490 - Check for a value passed to RUSTC_OPT_LEVEL rather than whether its value was a default. r=glandium
The current code will fail if "RUSTC_OPT_LEVEL=" is passed. This can happen
if the value isn't present and that fact is injected into js' configure. We
only want to respect RUSTC_OPT_LEVEL if a value is passed, so we simply check
for the presence of a value rather than its origin.

MozReview-Commit-ID: 6GhLfprJEEn

--HG--
extra : rebase_source : 40f3e381a128e04d65cc0175df32cdcd8302e05e
2017-11-13 22:07:46 -08:00
Chris Manchester
72c380c671 Bug 1416059 - Emit ASFLAGS and YASM_ASFLAGS from configure as lists. r=mshal
MozReview-Commit-ID: LBWpzQ9mISI

--HG--
extra : rebase_source : 4c722e68db4b6858aabbbecac834ea8772e0e06a
2017-11-14 10:38:17 -08:00
Andreea Pavel
a1061f09c5 Backed out 2 changesets (bug 1416059) for failing /python/mozbuild/mozbuild/test/frontend/test_emitter.py::TestEmitterBasic::test_use_yasm r=backout on a CLOSED TREE
Backed out changeset 597624409f4c (bug 1416059)
Backed out changeset d0df69766fa5 (bug 1416059)
2017-11-14 20:44:54 +02:00
Chris Manchester
4dca13b1ae Bug 1416059 - Emit ASFLAGS and YASM_ASFLAGS from configure as lists. r=mshal
MozReview-Commit-ID: LBWpzQ9mISI

--HG--
extra : rebase_source : f4074f4bdb0acddceeb57d9806c9a7f63a579280
2017-11-13 14:13:11 -08:00
Ted Mielczarek
851b7e1370 bug 1410148 - try to work around llvm-dsymutil crashes again by lowering rust debuginfo level on cross-mac builds. r=nalexander 2017-11-14 19:48:55 +01:00
Ryan VanderMeulen
b16410f51c Merge inbound to m-c. a=merge 2017-11-10 16:13:15 -05:00
Gregory Szorc
02bc7e2b1b Bug 1320738 - Mark MOZ_PGO as a JS option. r=froydnj, a=RyanVM
The changesets in bug 1412932 changed the semantics for MOZ_PGO.
Before, it was effectively being set as an environment variable
by client.mk all the time. Afterwards - specifically after
2013c8dd1824 - the variable is set in mozconfigs via ac_add_options,
which means it is only exposed to configure, not the environment.

Investigation by dmajor revealed that -WX (warnings as errors) was
added to a js/src file's compiler invocation after the PGO code
refactor. (PGO and warnings as errors have a strange interaction
- bug 437002 - and should be disabled there.) Strangely, addition
of -WX was only present on Dev Edition PGO builds.

The reason for this is likely mozharness. Mozharness will export
the MOZ_PGO=1 environment variable for build configurations that
it knows are PGO. It appears to do this for all PGO build
configurations except Dev Edition. Since make and moz.configure
inherit environment variables, mozharness was basically papering
over the intended behavior change in 2013c8dd1824.

This commit fixes the problem by marking MOZ_PGO as a JS option
in moz.configure. This means `ac_add_options MOZ_PGO=1` (the new
convention for enabling PGO) will set MOZ_PGO for SpiderMonkey's
moz.configure.

Of course, MOZ_PGO=1 in an environment variable still works. And
mozharness's setting of this variable has the intended effect.
Eventually, I'd like to clean up the mozharness code so it is less
PGO aware and enables PGO via ac_add_options. But that's for another
day.

MozReview-Commit-ID: 1KYPJARI6SJ

--HG--
extra : amend_source : 5291cead9f1c1af9ed2a1f608af770bc8e4958c5
2017-11-10 09:23:27 -08:00
Narcis Beleuzu
218e1676cb Merge inbound to mozilla-central r=merge a=merge 2017-11-08 12:51:09 +02:00
Margareta Eliza Balazs
130574a8e2 Merge mozilla-central to mozilla-inbound. r=merge a=merge CLOSED TREE 2017-11-08 00:09:29 +02:00
Margareta Eliza Balazs
4164a3a53d Merge inbound to mozilla-central r=merge a=merge 2017-11-07 23:57:03 +02:00
Randall Barker
8cb9ab66e9 Bug 1413362 - part 3: Add support to build system for GoogleVR based WebVR on Android r=froydnj,nalexander
MozReview-Commit-ID: 8BHBnvor5VT
2017-11-07 10:50:15 -08:00
Tom Prince
0463d142d7 Bug 1414298: Don't try to set yasm version config settings if yasm isn't found. r=froydnj
MozReview-Commit-ID: LTDxJ5su7sM

--HG--
extra : rebase_source : ab80df38451c59760aad0931c66104480195fb96
2017-11-06 11:07:26 -07:00
Sylvestre Ledru
c2b37a7ed8 Bug 1414794 - Unbreak the lld usage by providing the right data structure r=froydnj
MozReview-Commit-ID: 1caPjLBR4vS

--HG--
extra : rebase_source : e5028d054430028e2ad2caca84bd7514fd37f4de
2017-11-06 14:23:57 +01:00
Gregory Szorc
989efa7a51 Bug 1415335 - Move Windows line endings detection to configure; r=nalexander
This doesn't need to be in client.mk.

Also, we inline the info to help people correct the failure, as this
results in a better user experience.

MozReview-Commit-ID: KURL3RIGzKf

--HG--
extra : rebase_source : dc79d3f6aa4e91a12cab0e26d5fc0a3e15afa833
extra : source : 2eceb30625acd8cfadda0baa6326a7e9fd07dece
2017-11-07 17:16:39 -08:00
Gregory Szorc
6ff5d5762b Bug 1415335 - Move spaces in path check to configure; r=nalexander
Checks like this are what configure is for.

In addition to moving the check, we also validate topobjdir as well.

MozReview-Commit-ID: 9sVNQJsAnjO

--HG--
extra : rebase_source : 688961fffca5922c7186c0d39182de7220f7dbe3
extra : source : d9a4ea9bc34a1e0c710469fc0a556ed624ea387b
2017-10-30 16:35:04 -07:00
David Major
ea84880cdf Bug 1412952 - Use VS2017 with clang-cl builds. r=froydnj 2017-11-03 12:29:58 -04:00
Masatoshi Kimura
fce93f8e97 Bug 1414602 - fix flake8 lint errors. r=bustage-fix
MozReview-Commit-ID: AsJX4PQ1SIf

--HG--
extra : rebase_source : 42fd9620462d5b289cf1beaf463b3ca37453e30a
extra : amend_source : cbecb288db1af3865b36eaf75f0024f296df5dfc
2017-11-07 21:05:07 +09:00
Masatoshi Kimura
383e90a03b Backed out changeset 6555a2a899a0 (bug 1384557) due to causing bug 1414060. r=backout
MozReview-Commit-ID: FV44JQSDXPQ

--HG--
extra : amend_source : 8c05281fad889edd723ab58786d0bf16f7d325b0
2017-11-07 20:39:00 +09:00
Sebastian Hengst
f2944960ec Backed out 3 changesets (bug 1413362) for causing merge conflicts. r=merge a=merge
Backed out changeset 8b15dfaeecaa (bug 1413362)
Backed out changeset 2d9da0d19d04 (bug 1413362)
Backed out changeset 653c66220a5f (bug 1413362)

--HG--
extra : amend_source : e5c12297b0bb6ebe27a2481e4aac6c0ca8160a1b
2017-11-07 12:41:11 +02:00
Randall Barker
0f56210acd Bug 1413362 - part 3: Add support to build system for GoogleVR based WebVR on Android r=froydnj,nalexander
MozReview-Commit-ID: 8BHBnvor5VT
2017-11-06 17:43:29 -08:00
Nathan Froyd
17b6101551 Bug 1341234 - part 2 - add an intermediate step for determining bindgen's CFLAGS; r=gps
Add an intermediate step in old-configure.in for setting up
BINDGEN_CFLAGS (renamed to BINDGEN_SYSTEM_FLAGS), so we can add whatever
flags we like (e.g. for system libaries with their includes in
non-standard places) at a later point.
2017-11-10 10:05:36 -05:00
Tom Prince
e1f007efbe Bug 1413257: Allow disabling ffvpx's AVX2 support on linux64 for Thunderbird's buildbot; r=jya,rillian
MozReview-Commit-ID: 6USzO1GE7dJ

--HG--
extra : rebase_source : 4a25c5e7c1cbe7bb063f615accf6563333c48c9c
2017-10-31 12:42:27 -06:00
Ted Mielczarek
cb2b9afefe bug 1384557 - fix flake8 lint errors
MozReview-Commit-ID: 8dgZdOkAZ56

--HG--
extra : rebase_source : 6d4f937190c7312b3482d994ada31fa6ff5d2fac
2017-11-01 10:03:08 -04:00
Ted Mielczarek
54b6236e29 bug 1384557 - move _DEPEND_CFLAGS+CL_INCLUDES_PREFIX to toolchain.configure, ignore {CC,CXX}_WRAPPER when using sccache r=glandium
Currently mozconfig.cache overrides a few build options for sccache. This
patch moves them into toolchain.configure so that the build system will
set them properly when sccache is in use. Additionally, {CC,CXX}_WRAPPER
are set in config.mk, so just avoid setting them when sccache is in use.

MozReview-Commit-ID: FYlVKRI8OiN

--HG--
extra : rebase_source : 00715beb5fbd2c11311dec43809bd1febab56a11
extra : intermediate-source : 0f2b1b75b83737378d882a3c3e0d8dfb4efecd1f
extra : source : a8032ae9cb2ad1c4574c6ac6f5c2778863cd71e0
2017-01-10 16:52:27 -05:00
Sebastian Hengst
2470a9a87b merge mozilla-central to autoland. r=merge a=merge 2017-11-01 00:38:25 +01:00
Petr Sumbera
9fb34379c3 Bug 1412781 - sparcv9 cpu should be evaluated as 64bit. r=glandium 2017-10-30 02:50:48 -07:00
Sebastian Hengst
ea2bfe23e2 merge autoland to mozilla-central. r=merge a=merge
MozReview-Commit-ID: BnX9U7tZ4zU
2017-10-30 23:42:58 +01:00
Nathan Froyd
1c4901d060 Bug 1412734 - use the correct command-line flags to detect gold; r=snorp; a=RyanVM
We were adding c_compiler.flags and toolchain_flags to some paths
through this function, but not all.  Not adding those flags caused this
function to detect the host's ld.gold instead of the target's ld.gold.
And that, in turn, caused linker errors when the host ld.gold couldn't
understand the target's object files.

MozReview-Commit-ID: vJzWagUGkL
2017-10-30 12:06:54 -04:00
Gregory Szorc
7d078ee731 Bug 1412431 - Remove support for MOZ_BUILD_PROJECTS; r=nalexander
This was mainly used to support Universal MacOS builds, which were
removed several months ago.

In theory, someone could be using this feature to build multiple
applications with one build system invocation. But given that client.mk
is no longer the preferred interface to the build system and multiple
applications can be built by running `mach build` with different
mozconfigs, I don't think support for this feature is worth keeping.

This commit removes support for MOZ_BUILD_PROJECTS and related
functionality from client.mk. Support for recognizing
MOZ_CURRENT_PROJECT in configure and mozconfig evaluation has also
been removed. This includes support for the ac_add_app_options
mozconfig function.

Good riddance.

MozReview-Commit-ID: 7xI2jYxDFFr

--HG--
extra : rebase_source : 91068f3b8ae32fbcda4defb5d4bb086a04387598
2017-10-27 15:20:34 -07:00
Gregory Szorc
f818d2620e Bug 1411994 - Ignore Unicode errors when logging; r=glandium
LineIO currently attempts to convert bytes to unicode using the
system preferred encoding. This can obviously fail for some byte
sequences.

In many cases, the conversion is happening for purposes of logging.
In these cases, Unicode validation shouldn't be that important to
us.

So, this commit teaches LineIO to accept an argument defining its
Unicode error mode. We also teach relevant users of LineIO doing
logging to switch the default mode from "strict" to "replace" so
invalid Unicode byte sequences can be logged with the Unicode
replacement character.

During review, glandium pointed out that it may make better sense
to defer Unicode decoding to the logging layer instead of in LineIO.
I agree with this idea. But it can be implemented in another bug:
for now we should unbust the build system.

MozReview-Commit-ID: 7miuSDY8Xzv

--HG--
extra : rebase_source : 40d5d97d908d00b410b49d03729a34568e5bfb1a
2017-10-26 15:27:01 -07:00
Makoto Kato
41d5df0bac Bug 1411802 - Fix bustage after updating NDK r15c. r=me
MozReview-Commit-ID: 2kMieFmFWsJ

--HG--
extra : rebase_source : 2bea8a6590cadaeec3bfd807474f41535167b11f
2017-10-29 14:02:09 +09:00
Nathan Froyd
a29f4ac5f8 Bug 1163171 - part 9.1 - attempt to pacify flake8 complaints for real; r=me 2017-10-28 18:58:59 -04:00
Sebastian Hengst
286061948f Bug 1163171 - part 9 - fix flake8 complains in android-ndk.configure. r=me 2017-10-29 00:08:13 +02:00
Nathan Froyd
69423fba9b Bug 1163171 - part 3b - inform clang about the NDK's gcc toolchain; r=glandium
The NDK clang needs to be informed about the existence of a GCC
toolchain, so important programs like the linker can be located.  With
this change, we're starting to use command-line options that are
incompatible with GCC, so we also add a check to inform the user about
the non-support for this configuration.
2017-10-28 17:38:59 -04:00
Nathan Froyd
2c5288d26c Bug 1163171 - part 3a - expose the NDK clang binaries to toolchain configury; r=glandium
Our normal method of locating the compilers in the NDK is to set
--with-toolchain-prefix when compiling for Android.  However, the clang
binaries are in a different location than would otherwise be implied by
--with-toolchain-prefix.  Additionally, we still need to know about
--with-toolchain-prefix because the NDK clang needs to be pointed there
so clang can find important binaries like the linker and because various
other bits of the build system depend on the --with-toolchain-prefix
value as well.

So we need a separate mechanism for communicating the whereabouts of the
NDK clang.  We can't set CC and CXX because doing so would conflict with
the CC and CXX values exported to the js/src/ subconfigure.  But Android
already has an extra_toolchain_flags function that we use for informing
moz.configure about additional flags needed solely for Android, and we
can use a similar trick to communicate the existence of the NDK's clang
to the main C/C++ compiler selection process.
2017-10-28 17:38:59 -04:00
Nathan Froyd
bce27af988 Bug 1163171 - part 2 - switch to using -isystem rather than -idirafter for Android; r=glandium
This command-line flag is a little more evocative and works correctly
with both GCC and clang.
2017-10-28 17:38:59 -04:00
Sebastian Hengst
5c15da1f08 merge mozilla-inbound to mozilla-central. r=merge a=merge
--HG--
rename : testing/talos/tests/__init__.py => testing/talos/talos/unittests/__init__.py
rename : testing/talos/tests/browser_output.ts.txt => testing/talos/talos/unittests/browser_output.ts.txt
rename : testing/talos/tests/browser_output.tsvg.txt => testing/talos/talos/unittests/browser_output.tsvg.txt
rename : testing/talos/tests/profile.tgz => testing/talos/talos/unittests/profile.tgz
rename : testing/talos/tests/ps-Acj.out => testing/talos/talos/unittests/ps-Acj.out
rename : testing/talos/tests/test_talosconfig_browser_config.json => testing/talos/talos/unittests/test_talosconfig_browser_config.json
rename : testing/talos/tests/test_talosconfig_test_config.json => testing/talos/talos/unittests/test_talosconfig_test_config.json
rename : testing/talos/tests/xrestop_output.txt => testing/talos/talos/unittests/xrestop_output.txt
2017-10-27 12:45:34 +03:00
Gregory Szorc
95443edf17 Bug 1412044 - Fix linting failure; r=me
MozReview-Commit-ID: 7ME7ofs3cnv

--HG--
extra : rebase_source : 9167abc29d576ec1b5df1bc62dbc78a589e9bc23
2017-10-26 11:40:19 -07:00
Gregory Szorc
26e6361ee7 Bug 1412044 - Use separate arguments for rustc's -C option; r=ted
We subtly changed from "-C opt=value" to "-Copt=value" in 472232499478
(bug 1411081). This change appears to confuse sccache (which has its
own option parser).

This commit restores the old behavior of using separate arguments
for -C and its value.

MozReview-Commit-ID: JCnAjt1Tdsa

--HG--
extra : rebase_source : 2ad7aaf819c0c941efa2272c91d74ae7e52629e8
2017-10-26 11:26:14 -07:00
Chris Manchester
7e47dd1ebb Bug 1403346 - Define flags loading the clang plugin in configure rather than the make backend. r=glandium
MozReview-Commit-ID: EubsjJl1LBS
2017-10-25 15:12:10 -07:00
Chris Manchester
9889a2f30a Bug 1403346 - Use mozbuild.shellutil.split instead of split in config.status r=glandium
While we're here, provide a reference to unique_list as defined in
moz.configure when executing config.data to avoid its redefinition
in m4.

MozReview-Commit-ID: AI6XhoYR0Ye
2017-10-25 15:10:04 -07:00