Commit Graph

6177 Commits

Author SHA1 Message Date
Jim Chen
055a903128 Bug 1360291 - Detect NDK version number; r=nalexander
Detect the NDK major/minor version numbers, and feed that to Breakpad.
For AArch64, some Breakpad headers try to workaround NDK oddities by
checking the ANDROID_NDK_MAJOR_VERSION and ANDROID_NDK_MINOR_VERSION
macros.
2017-05-04 19:19:31 -04:00
Jim Chen
5a39ae87ca Bug 1360291 - Set minimum NDK platform version to 21 for 64-bit builds; r=nalexander
64-bit is only supported in android-21 and above in the NDK.
2017-05-04 19:19:30 -04:00
Jim Chen
6723035d5c Bug 1352177 - 2. Introduce new config file format for SDK bindings; r=snorp
Instead of specifying a class name per line, the new format uses the
.ini format, with each section name specifying the class, and each
property name specifying a member of the class. WrapForJNI options can
be specified with each class or member. Comments can be specified with
';' or '#'. For example,

 # Generate bindings for Bundle using default options:
 [android.os.Bundle]

 # Generate bindings for Bundle using class options:
 [android.os.Bundle = exceptionMode:nsresult]

 # Generate bindings for Bundle using method options:
 [android.os.Bundle]
 putInt = stubName:PutInteger

 # Generate bindings for Bundle using class options with method override:
 # (note that all options are overriden at the same time.)
 [android.os.Bundle = exceptionMode:nsresult]
 # putInt will have stubName "PutInteger", and exceptionMode of "abort"
 putInt = stubName:PutInteger
 # putChar will have stubName "PutCharacter", and exceptionMode of "nsresult"
 putChar = stubName:PutCharacter, exceptionMode:nsresult

 # Overloded methods can be specified using its signature
 [android.os.Bundle]
 # Skip the copy constructor
 <init>(Landroid/os/Bundle;)V = skip:true

 # Generic member types can be specified
 [android.view.KeyEvent = skip:true]
 # Skip everything except fields
 <field> = skip:false

 # Skip everything except putInt and putChar
 [android.os.Bundle = skip:true]
 putInt = skip:false
 putChar =

 # Avoid conflicts in native bindings
 [android.os.Bundle]
 # Bundle(PersistableBundle) native binding can conflict with Bundle(ClassLoader)
 <init>(Landroid/os/PersistableBundle;)V = stubName:NewFromPersistableBundle

 # Generate a getter instead of a literal for certain runtime constants
 [android.os.Build$VERSION = skip:true]
 SDK_INT = noLiteral:true
2017-05-03 11:36:18 -04:00
Jim Chen
f915e1bd65 Bug 1352177 - 1. Add a "noLiteral" option for WrapForJNI; r=snorp
For static final fields, generate a getter instead of a literal when
specified. Used to generate bindings for runtime constants whose values
are unknown at compile time.
2017-05-03 11:36:18 -04:00
Alex Gaynor
9ca18555b2 Bug 1360299 - When --enable-hardening is used, --enable-pie will be automatically enabled r=froydnj
r=froydnj

MozReview-Commit-ID: 7QFOTzSlXSj

--HG--
extra : rebase_source : 3dfde8102bdaf5afcd3fb4c9b5e9b78023e2d779
2017-05-01 15:00:50 -04:00
Wes Kocher
4120535ec8 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 6eRu2UC1Xmg
2017-05-01 16:01:52 -07:00
Alex Gaynor
4cbcec2157 Bug 1360300 -- Support enabling PIE when using clang. r=froydnj
Also remove bits of a comment, now that we support only macOS 10.9+, most of the
comment isn't relevant.

While PIE is enabled by default on macOS, this isn't true of clang on Linux.
--enable-pie can now be used with clang on Linux.

r=froydnj

MozReview-Commit-ID: rc6zJiWzLo

--HG--
extra : rebase_source : 3745175e106ea8c6be9271d8135d43ba359434c7
2017-05-01 15:45:33 -04:00
Frank-Rainer Grahl
2f2263123a Bug 1360631 - Fix VS2015 x86 cross compiling using start-shell.bat. r=ted 2017-04-30 03:40:00 -04:00
Nathan Froyd
d3325ce1a2 Bug 1329737 - part 3 - use an alternate linker for Cargo invocations; r=rillian
For linking static libraries, rustc will use whatever `cc` it finds (or
the equivalent on Windows).  For our purposes, however, `cc` is not what
we use to link and we may have additional options we would like to pass
to the linker.

To do this, we need to tell Cargo about our alternate linker (currently
only used for target compilations, on the theory that the host compiler
rustc finds is probably good enough) and we also need to pass our linker
options into the process.  We do this with environment variables, which
is not a great solution, but works surprisingly well.

This alternate linker is disabled for ASan builds due to peculiar
crashes when running Rust build scripts and for Windows, because we
don't do any interesting cross-compiling there.
2017-04-28 14:06:41 -04:00
Nathan Froyd
d9e05176d0 Bug 1329737 - part 1 - define a RUST_TARGET_ENV_NAME config variable; r=rillian
We need this for forming various Cargo environment variables.
2017-04-28 14:06:42 -04:00
Wes Kocher
9528ad9a03 Merge m-c to inbound, a=merge
MozReview-Commit-ID: DaH1djmEY5A
2017-04-27 13:29:07 -07:00
Ted Mielczarek
f12882b7f6 bug 1318143 - add a --with-visual-studio-version to choose which VS version configure chooses when multiple versions are installed. r=gps
MozReview-Commit-ID: C6IoZJNHR4G

--HG--
extra : rebase_source : 60afcf53d61b8314cbd9e621ead8efd282e28a39
2017-04-20 12:43:44 -04:00
Ted Mielczarek
e0a932a9ba bug 1318143 - add support for detecting Visual Studio 2017 to configure. r=gps
This patch adds a copy of vswhere.exe to build/win32, downloaded from the
current latest release (1.0.62):
https://github.com/Microsoft/vswhere/releases/download/1.0.62/vswhere.exe

It changes toolchain.configure to invoke vswhere.exe instead of reading
the registry, since that no longer works for VS2017 (but vswhere can locate
VS2015). It also removes a layer of complexity in that code by dropping
support for non-64-bit host systems, since we don't really support building
on 32-bit Windows anymore anyway.

There's a little bit of fixup in windows.configure where some LIB paths
have changed in 2017.

MozReview-Commit-ID: 5XLWjidS6W4

--HG--
extra : rebase_source : 90f79b6f4a2d8d925dd20eb0bf6ab96262c227d5
2017-04-26 15:18:48 -04:00
Tom Ritter
f8c3899ea0 Bug 1353541 Fix rustc in MinGW build r=froydnj,ted
rustc generates .lib files for its libraries when compiling for Windows
(even using MinGW on Linux). But MinGW expects .a files. So we add in
rust-specific prefix and suffixes so MinGW builds can find the libs that
rustc generates. (And the RUST_LIB- variables default to the same vales
as the LIB_ variables otherwise.)

MozReview-Commit-ID: ClsA0YuJaxh

--HG--
extra : rebase_source : 7b46460c94ceb34b7a5a302ce91d3f1dca600041
2017-04-26 12:08:59 -05:00
Sebastian Hengst
6d6d39a029 Backed out changeset 6eb93543bf16 (bug 1318143) for Windows build bustage. r=backout 2017-04-25 22:38:36 +02:00
Sebastian Hengst
21f78de4ba Backed out changeset fc094009b7c1 (bug 1318143) 2017-04-25 22:38:09 +02:00
Ted Mielczarek
3a3b0348ed bug 1318143 - add a --with-visual-studio-version to choose which VS version configure chooses when multiple versions are installed. r=gps
MozReview-Commit-ID: C6IoZJNHR4G

--HG--
extra : rebase_source : 33a4aeae84f897e5402f1e41ac5e4f18a68c0eea
2017-04-20 12:43:44 -04:00
Ted Mielczarek
aaf6f64815 bug 1318143 - add support for detecting Visual Studio 2017 to configure. r=gps
This patch adds a copy of vswhere.exe to build/win32, downloaded from the
current latest release (1.0.62):
https://github.com/Microsoft/vswhere/releases/download/1.0.62/vswhere.exe

It changes toolchain.configure to invoke vswhere.exe instead of reading
the registry, since that no longer works for VS2017 (but vswhere can locate
VS2015). It also removes a layer of complexity in that code by dropping
support for non-64-bit host systems, since we don't really support building
on 32-bit Windows anymore anyway.

There's a little bit of fixup in windows.configure where some LIB paths
have changed in 2017.

MozReview-Commit-ID: 5XLWjidS6W4

--HG--
extra : rebase_source : 15c69aeca3295a1811c85a9cf4c2793312dcd122
2017-04-25 06:29:30 -04:00
Alex Gaynor
1de783d5aa Bug 620058 - Add a --enable-hardening flag, which compiles with -fstack-protector-strong on GCC and Clang r=froydnj
This flag enables the stack-cookie exploit mitigation for all functions which
manipulate stack-based buffers, providing better protections than
-fstack-protector, at considerably lower performance overhead than
-fstack-protector-all.

r=froydnj

MozReview-Commit-ID: 7ZNAHHAf376

--HG--
extra : rebase_source : 6d5ccbb9537372912c3f5a73fe0fdc65bb68ac08
2017-04-12 13:58:22 -04:00
Michael Layzell
2372ce0fc1 Bug 1339537 - Part 5: Produce better annotation reason diagnostics for implicit annotations, r=ehsan
This allows for the alignas(_) case to be distinguished from the
MOZ_NON_PARAM case through notes.

MozReview-Commit-ID: 4KIbzEKnmNU
2017-04-27 12:44:55 -04:00
Michael Layzell
221c4e65ae Bug 1339537 - Part 2: Update the MOZ_NON_PARAM analysis to implicitly apply to alignas(_) types, r=ehsan
MozReview-Commit-ID: 2VDJRxxkVjV
2017-04-27 12:44:49 -04:00
Michael Layzell
71b5c1a204 Bug 1339537 - Part 1: Teach the clang plugin about ThirdPartyPaths.txt, r=ehsan
MozReview-Commit-ID: PS9x7Nh1h8
2017-04-27 12:44:46 -04:00
Kearwood Gilbert
eba3a06d5f Bug 1356382 - Move jsoncpp library and ensure it is included even when crashreporter is not r=ted
MozReview-Commit-ID: 2g9sFP6QQCU

--HG--
rename : toolkit/crashreporter/jsoncpp/AUTHORS => toolkit/components/jsoncpp/AUTHORS
rename : toolkit/crashreporter/jsoncpp/GIT-INFO => toolkit/components/jsoncpp/GIT-INFO
rename : toolkit/crashreporter/jsoncpp/LICENSE => toolkit/components/jsoncpp/LICENSE
rename : toolkit/crashreporter/jsoncpp/NEWS.txt => toolkit/components/jsoncpp/NEWS.txt
rename : toolkit/crashreporter/jsoncpp/README.md => toolkit/components/jsoncpp/README.md
rename : toolkit/crashreporter/jsoncpp/include/json/allocator.h => toolkit/components/jsoncpp/include/json/allocator.h
rename : toolkit/crashreporter/jsoncpp/include/json/assertions.h => toolkit/components/jsoncpp/include/json/assertions.h
rename : toolkit/crashreporter/jsoncpp/include/json/autolink.h => toolkit/components/jsoncpp/include/json/autolink.h
rename : toolkit/crashreporter/jsoncpp/include/json/config.h => toolkit/components/jsoncpp/include/json/config.h
rename : toolkit/crashreporter/jsoncpp/include/json/features.h => toolkit/components/jsoncpp/include/json/features.h
rename : toolkit/crashreporter/jsoncpp/include/json/forwards.h => toolkit/components/jsoncpp/include/json/forwards.h
rename : toolkit/crashreporter/jsoncpp/include/json/json.h => toolkit/components/jsoncpp/include/json/json.h
rename : toolkit/crashreporter/jsoncpp/include/json/reader.h => toolkit/components/jsoncpp/include/json/reader.h
rename : toolkit/crashreporter/jsoncpp/include/json/value.h => toolkit/components/jsoncpp/include/json/value.h
rename : toolkit/crashreporter/jsoncpp/include/json/version.h => toolkit/components/jsoncpp/include/json/version.h
rename : toolkit/crashreporter/jsoncpp/include/json/writer.h => toolkit/components/jsoncpp/include/json/writer.h
rename : toolkit/crashreporter/jsoncpp/src/lib_json/json_reader.cpp => toolkit/components/jsoncpp/src/lib_json/json_reader.cpp
rename : toolkit/crashreporter/jsoncpp/src/lib_json/json_tool.h => toolkit/components/jsoncpp/src/lib_json/json_tool.h
rename : toolkit/crashreporter/jsoncpp/src/lib_json/json_value.cpp => toolkit/components/jsoncpp/src/lib_json/json_value.cpp
rename : toolkit/crashreporter/jsoncpp/src/lib_json/json_valueiterator.inl => toolkit/components/jsoncpp/src/lib_json/json_valueiterator.inl
rename : toolkit/crashreporter/jsoncpp/src/lib_json/json_writer.cpp => toolkit/components/jsoncpp/src/lib_json/json_writer.cpp
extra : rebase_source : 6996fe5fd4a8e704a138b568d636c1d5238f15b2
2017-04-19 14:41:03 -07:00
Edmund Wong
33a667c380 Bug 1358403 - Add a colon to complete the rust url when mach build dies when it can't find the rust compiler. r=froydnj
MozReview-Commit-ID: 3E3A9laTdoX

--HG--
extra : rebase_source : 2c5745eadd935b0e20abfb2d106bdb247ea0b5e8
2017-04-21 15:43:14 +08:00
Chris Peterson
1345634886 Bug 1356843 - Enable -Wcomma clang warnings. r=glandium
Warn about possible misuse of the comma operator such as between two statements or to call a function for side effects within an expression. Only enable these -Wcomma warnings for C++ code because there are almost two hundred -Wcomma warnings in third-party C libraries. I reviewed the C warnings and confirmed none of them were latent bugs. We won't fix these libraries' warnings so they are just noise.

MozReview-Commit-ID: 1JXJumg6DsJ

--HG--
extra : rebase_source : c48189653361aa84edd3004188315cd73aefa9b5
extra : amend_source : 30be5afeb03eff26d59ccde57c0eb547b743c304
2017-04-08 12:36:48 -07:00
Carsten "Tomcat" Book
54c9498baf Merge mozilla-central to mozilla-inbound 2017-04-20 13:03:06 +02:00
Dragana Damjanovic
ecca1ff420 Bug 1310197 - Implement fast open nspr part. r=mcmanus,bagder 2017-04-20 14:11:26 +08:00
Tom Ritter
7d7682b05b Bug 1314979 Support cross compilation with MINGW in windows.configure r=glandium
MINGW builds do not need any of the checks that are performed in the
windows.configure file. Nor do they the D3D compiler DLL that is
needed for ANGLE, so we can skip that entire section in
old-configure.in.

MozReview-Commit-ID: DqufbgGoGy4

--HG--
extra : rebase_source : d5f1ed371f79a8a16f888ccc5d058ac72a69f34f
2017-04-19 10:18:01 -05:00
Mike Hommey
34e619d1c1 Bug 1357323 - Remove support for gonk in the build system. r=gps
Everything depending on the widget being gonk can go away, as well as
everything depending on MOZ_AUDIO_CHANNEL_MANAGER, which was only
defined on gonk builds under b2g/ (which goes away in bug 1357326).

--HG--
extra : rebase_source : 9f0aeeb7eea8417fa4e06d662d566d67ecaf2a24
2017-04-18 16:56:09 +09:00
Mike Hommey
7008b83ac0 Bug 1356927 - Use ar and ranlib from cctools on mac builds. r=gps
--HG--
extra : rebase_source : 89275a0930ab6e7629fe05027cfb3ed3e459f800
2017-04-17 10:36:05 +09:00
Mike Hommey
1170646315 Bug 1356101 - Derive the mach_bootstrap search path from build/virtualenv_packages.txt. r=gps
Most entries in virtualenv_packages.txt that are .pth or packages.txt
are currently in SEARCH_PATHS in mach_bootstrap. The ones that are
missing would make sense in SEARCH_PATHS. None of non-.pth or
packages.txt entries, however, are in SEARCH_PATHS and don't make sense
there.

On the other hand, virtualenv_packages.txt misses a lot of things that
are in SEARCH_PATHS, all of which should be there. One exception:
xpcom/idl-parser, which causes problems due to the xpidl package
containing an xpidl module, which causes problems with the in-tree
scripts using it. Plus, it needs a cache directory, which is messy, so
it's preferable to keep it away from the virtualenv. It turns out it was
added to mach_bootstrap.py in bug 893976 for a command that was since
then removed (bug 1244736), so we can get away with removing it.

So instead of keeping those two separate lists out of sync, we replace
the SEARCH_PATHS list from mach_bootstrap with one that is derived at
runtime from the contents of virtualenv_packages.txt.

And since a .pth can't fail to install in the virtualenv, it makes no
sense to have psutil.pth defined as optional, which allows it to end up
in the mach_bootstrap search path automatically.

Finally, because we do have overlapping module names in the tree (e.g.
runtests), and mach_bootstrap's SEARCH_PATHS had a guaranteed order,
we change the order of the virtualenv_packages.txt file to match what
used to be in mach_bootstrap, and make all the pth entries use the same
file name so that the order is more guaranteed in the virtualenv too.

--HG--
extra : rebase_source : 5bd09f2f984d6f78a76b38e768d8a67806af5954
2017-04-14 08:19:08 +09:00
Mike Hommey
c80d13986f Bug 1356541 - Avoid MOZBUILD_STATE_PATH prompt on automation. r=gps
--HG--
extra : rebase_source : 7e12635ae7e29fef0838b6e07a037a59acf381f9
2017-04-14 20:20:52 +09:00
Mike Hommey
d559ffb37a Bug 1343718 - Limit artifact downloads by size rather than by number. r=chmanchester
This adds a unit test for the expected behavior, and adds the modules
from mach_bootstrap.py that are missing in the virtualenv for the test
to run.

--HG--
extra : rebase_source : e34d0474cfb6c8c5ce9cd847b96de88906191923
2017-04-12 16:17:52 +09:00
Petr Sumbera
0e17adee7c Bug 1354510 - Firefox build should recognize Solaris. r=glandium
--HG--
extra : rebase_source : 2bec2709a26a5295e723b0ecc424b0d648715bb7
2017-04-11 00:01:32 -07:00
Iris Hsiao
944f87c575 merge mozilla-inbound to mozilla-central a=merge 2017-04-12 11:16:46 +08:00
Jim Blandy
66934884d5 Bug 1349022 - Don't put -DTRACING in the C/C++ flags for debug builds since nobody uses it. r=glandium
--HG--
extra : rebase_source : 51edb82f89b29de9cb6fbb7becaa8ace3d9d40f8
2017-03-20 15:25:55 -07:00
Chris Manchester
b0e76254de Bug 1337986 - Remove dependencies between packaging steps and buildsymbols. r=mshal,ted
These dependencies are no longer relevant now that we're dumping symbols
for individual programs and libraries during the compile tier. The
automation/buildsymbols target now corresponds to archiving the
dumped symbols, and does not modify programs and libraries.

MozReview-Commit-ID: IQYIaVoqVJN

--HG--
extra : rebase_source : 1eb6d36b20381be77264cf01323850747bd94d1c
2017-04-10 10:27:50 -07:00
Mike Shal
5b62b8c036 Bug 1337145 - Remove python components used for EME generation; r=glandium
MozReview-Commit-ID: G8OhcbStQkG

--HG--
extra : rebase_source : ad7434cf729c3257bcc3911a4d25ba0145384939
2017-04-10 13:40:03 -04:00
Carsten "Tomcat" Book
3a762886de Merge mozilla-central to mozilla-inbound 2017-04-07 15:33:03 +02:00
Mike Hommey
e91179eda5 Bug 1344038 - Remove --enable-gnomeui. r=karlt
--HG--
extra : rebase_source : 562519f2f6727750afe7d4a8503b41e722222d7d
2017-03-08 15:35:53 +09:00
Mike Hommey
94c16743bb Bug 1344038 - Remove --disable-gio. r=karlt
--HG--
extra : rebase_source : 3b5b820536b0e9b1fb1da3a16c444ed7839770b9
2017-04-05 14:06:25 +09:00
Ted Mielczarek
60fab48ceb bug 1350093 - fix sccache configuration to handle changes in the format of TASKCLUSTER_WORKER_GROUP. r=froydnj
The TASKCLUSTER_WORKER_GROUP environment variable used to contain the full
AWS availability zone, but a recent docker-worker change changed it to
be simply the AWS region, which broke sccache in taskcluster because we
were using it as part of the S3 bucket name.

MozReview-Commit-ID: 1KsfWpB4PoY

--HG--
extra : rebase_source : bdc61f180bf079eb0ad2cdbbd25e3e3a0deb62e6
2017-04-06 12:03:14 -04:00
Ting-Yu Chou
337e68fa28 Bug 1333003 part 4 - Package the binary of llvm-symbolizer also on Windows. r=ted
MozReview-Commit-ID: 4nhVgQTJ7Bz

--HG--
extra : rebase_source : 4df3d39da1847ff40927ec3d1f11f76916181a46
2017-03-10 12:24:02 +08:00
Ting-Yu Chou
270fef8c41 Bug 1333003 part 1 - Add Windows x64 ASan mozconfigs to the tree. r=mshal
MozReview-Commit-ID: KuXcyL6yqH7

--HG--
extra : rebase_source : 8e77a7858f28f4b8f4052c3235c7b5daee828053
2017-03-10 14:13:07 +08:00
Iris Hsiao
15a34cacd2 Backed out 3 changesets (bug 1344038) for bustage
Backed out changeset 4befea89d81b (bug 1344038)
Backed out changeset c859506b2e4e (bug 1344038)
Backed out changeset 5d28a6382285 (bug 1344038)

--HG--
rename : netwerk/protocol/gio/moz.build => extensions/gio/moz.build
rename : netwerk/protocol/gio/nsGIOProtocolHandler.cpp => extensions/gio/nsGIOProtocolHandler.cpp
2017-04-06 10:35:56 +08:00
Mike Hommey
a96508cc4d Bug 1344038 - Remove --enable-gnomeui. r=karlt
--HG--
extra : rebase_source : cf3cd5795af68fd08ee1e1f0d7b89a67d453fa87
2017-03-08 15:35:53 +09:00
Mike Hommey
0543a25916 Bug 1344038 - Remove --disable-gio. r=karlt
--HG--
extra : rebase_source : b380d5ebfc3689a9d8d4e3825c83028f837838f2
2017-04-05 14:06:25 +09:00
Mike Hommey
97164d67cd Bug 1353661 - Don't build elfhack/inject during export. r=mshal
When the clang plugin is used, building something during export needs to
happen after the plugin is built. But there is no dependency ensuring
this happens.

OTOH, these sources in elfhack/inject don't need to be built that early,
so we'll just leave to the build system to build it at a proper time.

--HG--
extra : rebase_source : a6bef8ec6eece3a1b0e45f84c907c2fbc0800863
2017-04-05 18:01:33 +09:00
Andrzej Hunt
86b076ed2e Bug 1338629 - Update annotation processing classpath to reflect SDK 25.3+ r=nalexander
It looks like Google decided to split these jars out a bit, so we need to piece
them all back together.

We could probably just query the sdk version instead, but I'm not 100% sure
know when this setup changed - moreover we don't know when (if?) the paths
are likely to change again. SDK 26.0 still has lint 25.3.1, so the SDK and
lint versions don't appear to be tied.

It seems that only the lint* jars are needed to compile 'build/annotationProcessor',
however we need all the remaining jars in the classpath when running that code
in 'widget/android/bindings'.

MozReview-Commit-ID: GAKwMrVXW55

--HG--
extra : rebase_source : 4e790aaccae8ccc3f151c39bf1ef4404b2581d7a
2017-03-30 18:55:02 -07:00
Alessio Placitelli
7c7671ed07 Bug 1345153 - Suppress valgrind warnings for PR_SetEnv in SetupCrashReporterDirectory. r=njn
MozReview-Commit-ID: 4vV2EHsgTVT

--HG--
extra : rebase_source : c5af8757174610879dd7234d9d699483cf235bdf
2017-03-30 08:04:11 +02:00