Commit Graph

748 Commits

Author SHA1 Message Date
Bill McCloskey
794104b1e1 Bug 1413738 - Mozsearch clang plugin (r=mystor)
MozReview-Commit-ID: 53zUQ0vDMpd
2017-11-16 15:06:32 -08:00
Makoto Kato
8e2ff2b365 Bug 1415453 - Use vfpv3-d16 as default on Android/arm. r=froydnj
According to https://developer.android.com/ndk/guides/abis.html,
androideabi-v7a must support vfpv3-d16.  So we should use it for fpu flag.

MozReview-Commit-ID: 3rhmRTekmwD

--HG--
extra : rebase_source : c5ffa22d8712fc7b8006cc340175a9586d77f49b
2017-11-10 16:47:21 +09:00
Nathan Froyd
380dc56df2 Bug 1341234 - part 1 - add AC_SUBST_TOML_LIST macro; r=gps
Stylo's bindgen is configured partially through a .toml.in file that
substitutes the value of a configure variable (BINDGEN_CFLAGS) into a
TOML list.  We can debate whether this is a good thing to do some other
time; the reality is that the current moz.configure code that provides
the set_config for BINDGEN_CFLAGS needs to perform all the quoting
itself.

We want, however, to define the substituted variable in old-configure.in
land (some of the values that will go into BINDGEN_CFLAGS are only
defined in old-configure.in, and are not trivially ported to
moz.configure), which means that we need to have quoting logic in
m4/Python when we generate config.status.  This patch adds an
appropriate macro for doing so.
2017-11-10 10:05:36 -05:00
Nathan Froyd
1009160a12 Bug 1341234 - part 0 - fix typo in AC_SUBST_SET checking; r=gps
The various AC_SUBST macros generate AC_SUBST_*FOO macros for holding the
values to substitute.  The macros also cross-check the AC_SUBST_* macros
generated by other variants to make sure that you don't try to do
something like AC_SUBST(FOO) and AC_SUBST_SET(FOO).  However, the check
in AC_SUBST_SET for AC_SUBST_LIST duplicate is missing an underscore:
the AC_SUBST_LIST macro generates another macro starting with
AC_SUBST_LIST_, but the AC_SUBST_SET macro checks for the prefix
AC_SUBST_LIST, which is missing the trailing underscore.

As we're going to be adding yet another AC_SUBST_* macro variant, and
therefore adding more checks to all existing macros, let's clean this up
before we start.
2017-11-10 10:05:36 -05:00
Chris Manchester
857b599beb Bug 1411712 - Use AC_SUBST_LIST instead of AC_SUBST for vairables from configure contributing to LDFLAGS. r=mshal
MozReview-Commit-ID: 21jJY8oanQB

--HG--
extra : rebase_source : 5ba85c10bc64fd8817fda956dab3bc6965679eff
2017-11-02 11:47:48 -07:00
Nathan Froyd
fc41938428 Bug 1163171 - part 4 - fix jsapi-tests link errors with __atomic_* intrinsics on x86/Android with clang; r=glandium
NDK r15+ clang changed the code generation strategy for the __atomic_*
intrinics such that using them with 64-bit types now requires linking
with libatomic.  Our current configure tests for libatomic doesn't catch
this, because the std::atomic implementation is such that it doesn't
require an external library, even for 64-bit types, whereas the
__atomic_* intrinsics do.  The safest thing to do is to force this
configure check to always return true when we are compiling for
x86/Android with clang.
2017-10-28 17:38:58 -04: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
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
Chris Manchester
f09fbe07c1 Bug 1403346 - Use AC_SUBST_LIST for LLVM_CXXFLAGS. r=glandium
MozReview-Commit-ID: bsX83492AP
2017-10-25 15:12:10 -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
Makoto Kato
7ae7c43e2f Bug 1409624 - Cannot detect valid emulator command when using Android Tools 26. r=nalexander
Although there is emulator command in android_sdk_root/tools even if Android
Tools 26, it doesn't work well because emulator64-arm is missing in same
directory.

Valild emulator command moves from android_sdk_root/tools to
android_sdk_root/emulator from Android Tools 26 (updated by sdkmanager).

MozReview-Commit-ID: 4IGHK3YcZXD

--HG--
extra : rebase_source : cc0c67f24c32a55ac40e65a5a036d5072dff6ee4
extra : histedit_source : 9718746e56dd9ec16a540533acfe909c319c234b
2017-10-18 14:01:28 +09:00
Jan Henning
a31bec0c1f Bug 1407029 - Accept Android lint dependencies from SDK versions 26.0.0*. r=nalexander
MozReview-Commit-ID: GHMRossAUaB

--HG--
extra : rebase_source : c4ad6eddd4436c6169b98913a5aa9e085e15a70e
2017-10-09 21:54:54 +02:00
Makoto Kato
6a7100fa7b Bug 1397764 - Part 1. Move STLPORT_CPPFLAGS to moz.configure. r=chmanchester
To build sytlo, we have to set compiler flags via BINDGEN_CFLAGS.  Since we
 pass stlport flags to clang, I would like to move STLPORT_CPPFLAGS to
moz.configure.

MozReview-Commit-ID: 26jvUqUvwTY

--HG--
extra : rebase_source : 5568627368fbf2dce02904918e50a241713d0a85
2017-09-29 16:45:44 +09:00
Makoto Kato
44d3f0277d Bug 1401448 - Remove libstdc++ support from Android buildconfig. r=froydnj
libstdc++ support is broken after moving to moz.configure.  No one uses this option and NDK will remove GCC, so we should remove this and --with-android-cxx-stl option.

MozReview-Commit-ID: 3mqyHoRCE00

--HG--
extra : rebase_source : 35aa911a69e159e67f624ab5ab9aea8af4c5342f
2017-09-20 16:38:48 +09:00
Makoto Kato
209f37db12 Bug 1400128 - Link thumb library of libc++ when using MOZ_THUMB=1 and NDK r11c. r=froydnj
cpu_arch_dir isn't absolute path, we cannot always detect thumb library for c++ library.  Our build tool still uses NDK r11c, so we should check thumb library correctly.

MozReview-Commit-ID: 912ZDNeUcKc

--HG--
extra : rebase_source : 8b69348ef3280f32b7a228d66462070413a25e73
2017-09-15 13:40:43 +09:00
Philip Chimento
034b4fdfa6 Bug 1379539 - Remove unnecessary NSPR dependency. r=glandium 2017-07-25 14:15:50 -07:00
Carsten "Tomcat" Book
546b19363f Backed out changeset 514cf1f55c6f (bug 1380639) 2017-08-07 13:23:35 +02: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
Gregory Szorc
204ba452aa Bug 1382930 - Remove configure references to gonk; r=glandium
Some gaia-related code was also found and removed as part of the
cleanup.

MozReview-Commit-ID: DEjVSljzzu1

--HG--
extra : rebase_source : 58c4c34df44a258d90029853f29ea01338bd142b
2017-07-20 21:48:10 -07:00
mozilla@mozilla-23773
6d62fe4972 Bug 1344244 - Part 1: Accept newer Android lint version. r=glandium
MozReview-Commit-ID: KRwU0UKjkZZ

--HG--
extra : rebase_source : 45325d8c37dcdaffa6ee6f22273db59963758509
2017-06-29 11:43:22 -07:00
Sylvestre Ledru
b4dc56b423 Bug 1351109 - Move the gold linker support to the python configure r=glandium
MozReview-Commit-ID: 1FC0W7EqdCI

--HG--
extra : rebase_source : 6df832649a6130869b106cf8c79164b85d1f1ca6
2017-07-05 11:27:56 +02:00
Nick Alexander
bd230aea82 Bug 1352602 - Part 2: Use build system SDK versions in Gradle configurations. r=maliu
This patch does two things:

- add a Gradle-only ANDROID_COMPILE_SDK_VERSION substitution;
- uses it while uniformizing all of the Gradle Android SDK version
  configurations.

The approach is fairly standard (and we were using it already); see,
for example
https://medium.com/@ali.muzaffar/gradle-configure-variables-for-all-android-project-modules-in-one-place-5a6e56cd384e

This will make bumping the Gradle configuration versions forward
easier.

MozReview-Commit-ID: 1j5siCvR5qt

--HG--
extra : rebase_source : 07afb00de0e4a72af4026eb19ff4f2530c119336
2017-06-21 10:52:30 -07:00
Nick Alexander
23b90d5c28 Bug 1352602 - Part 1: Don't AC_DEFINE ANDROID_TARGET_SDK, MOZ_ANDROID_{MIN,MAX}_SDK_VERSION. r=chmanchester
This is just a small piece in the larger project of minimizing the set
of global AC_DEFINEs.  None of these are relevant to C/C++ code;
they're mobile/android specific, so we should get them out of
mozilla-config.h.

In addition, this replaces hard-coded values with values from the
build system throughout mobile/android.

MozReview-Commit-ID: 9IJlsm38LFK

--HG--
extra : rebase_source : 0e55c0967cbb7f0df0d297eb330fc615e5759346
2017-06-21 11:16:08 -07:00
Nathan Froyd
3b6501dd91 Bug 1377970 - add -llog for Android in moz.build; r=chmanchester
Adding -llog in this way is cleaner and is just a little bit less m4.
2017-07-05 09:32:30 -04:00
Christian Holler
b8ee76ebd8 Bug 1373256 - Changes to support -fsanitize=integer in the codebase. r=froydnj
The -fsanitize=integer analysis from UBSan can be helpful to detect signed and unsigned integer overflows in the codebase. Unfortunately, those occur very frequently, making it impossible to test anything with it without the use of a huge blacklist. This patch includes a blacklist that is broad enough to silence everything that would drain performance too much. But even with this blacklist, neither tests nor fuzzing is "clean". We can however in the future combine this with static analysis to limit ourselves to interesting places to look at, or improve the dynamic analysis to omit typical benign overflows.

It also adds another attribute that can be used on functions. It is not used right now because it was initially easier to add things to the compile-time blacklist to get started.

Finally, it includes a runtime suppression list and patches various parts in the test harnesses to support that. It is currently empty and it should not be used on frequent overflows because it is expensive. However, it has the advantage that it can be used to differentiate between signed and unsigned overflows while the compile-time blacklist cannot do that. So it can be used to e.g. silence unsigned integer overflows on a file or function while still reporting signed issues. We can also use this suppression list for any other UBSan related suppressions, should we ever want to use other features from that sanitizer.

MozReview-Commit-ID: C5ofhfJdpCS

--HG--
extra : rebase_source : 952043a441b41b2f58ec4abc51ac15fa71fc142f
2017-04-09 12:59:26 +02:00
André Bargull
5012580c88 Bug 1353650 - Part 6: Change minimum system ICU version to ICU 59. r=Waldo
--HG--
extra : rebase_source : c6848f374801e497e183594d57af98ccccb986f3
2017-04-05 13:43:49 +02:00
Mike Hommey
0ec6e285c9 Bug 1354581 - Move --enable-release/DEVELOPER_OPTIONS to python configure. r=cmanchester+432261
--HG--
extra : rebase_source : a0a07507ec4ac80d6e873b75bf359d5ef4c1bfea
2017-06-21 10:29:28 +09:00
Nathan Froyd
2fc0cc265c Bug 1372987 - move library/object prefix/suffix configuration to moz.configure; r=mshal
For parts of configuring Stylo, we need information about the library
extensions on all of our platforms, and this change is a reasonable way
to get at that information without duplicating it in two places.  Plus
moving more things to moz.configure is more better.
2017-06-19 14:20:29 -04:00
Mike Hommey
dd4c5336f3 Bug 1367267 - Pass -fPIC when compiling the -pie configure test. r=gps
--HG--
extra : rebase_source : 1f9f4638c864f5efb2d43b3a4440fceda9dd6f1d
2017-05-24 09:24:09 +09:00
Mike Hommey
782725e19a Bug 1363992 - Remove jemalloc 4. r=njn
--HG--
extra : rebase_source : 9794320e96279cbb8b7b66db6720c959eaa6a95b
2017-05-11 13:23:07 +09:00
Mike Hommey
02a06f7958 Bug 1363992 - Remove support for making jemalloc4 the default. r=njn
--HG--
extra : rebase_source : 77e1c13aa329637d0ec875439d572ee06e6919fa
2017-05-11 13:16:00 +09:00
Mike Hommey
1a9d4c6f33 Bug 1363992 - Remove support for system jemalloc. r=njn
--HG--
extra : rebase_source : 9141402b6f9e84c67afc14303633d328eb5b652c
2017-05-11 13:03:20 +09:00
Nick Alexander
14dd745141 Bug 1365060 - Move MOZ_{NATIVE_DEVICES, INSTALL_TRACKING} to moz.configure. r=chmanchester
This intentionally allows to set MOZ_INSTALL_TRACKING without
reference to the milestone being release or beta.  That is, we
separate the default value (which depends on release or beta) from the
value specified, making life easier for developers.

MozReview-Commit-ID: 3vPF7KO7fEX

--HG--
extra : rebase_source : 8d5764104b5322a32e4a048bfd3222f62fed73bb
2017-05-15 14:37:54 -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
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
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
Makoto Kato
dc58093a7b Bug 1283611 - Change order of include path to support NDK r13+ r=froydnj
When using NDK r13+ with part 1, the following build error still occurs when using cmath.

 0:21.01 /mozilla/android-ndk-r14b/sources/cxx-stl/llvm-libc++/include/math.h:661:105: error: 'acosl' was not declared in this scope
 0:21.01  inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) _NOEXCEPT {return acosl(__lcpp_x);}

To fix this, we need change the order of include path.

MozReview-Commit-ID: AZ3ebx3pAil

--HG--
extra : rebase_source : ca3ef90372a9c2b84f4a9bed3581be0f21e17d77
2017-03-27 12:11:51 +09:00
Dan Albert
77f7d59908 Bug 1283611 - Add support for NDK r13's libc++ paths. r=froydnj
The inner directory in these projects was removed in r13.

MozReview-Commit-ID: AxWgxXyOKJ4

--HG--
extra : rebase_source : 1290e8c709930f28f80bc201d7e72b53b8063634
2016-11-11 14:35:51 -08:00
Jesse Schwartzentruber
df40990bb3 Bug 1335411 - Fix --enable-address-sanitizer for Mac cross-compilation and adapt Linux ASan configs for Mac. r=froydnj
--HG--
extra : rebase_source : 493400a792fd50266a8d434b842710586c7947c5
2017-02-10 11:10:23 -05:00
Ehsan Akhgari
b897b4790e Bug 1331957 - Part 12: Remove -Lclang/lib from the LDFLAGS used to build the clang plugin; r=froydnj
This ensures that we correctly link against /usr/lib/libc++.1.dylib.
With this flag left in LDFLAGS, the linker would find libc++.1.dylib in
clang/lib, which would cause us to link against @rpath/libc++.1.dylib.
2017-02-03 10:19:49 -05:00
Iris Hsiao
e7d1ec1886 Backed out 14 changesets (bug 1331957, bug 1336149) for OS X 10.7 debug static analysis build bustage
Backed out changeset a01bead75258 (bug 1336149)
Backed out changeset 9a64d3102f6b (bug 1331957)
Backed out changeset a10f7732a754 (bug 1331957)
Backed out changeset 82c98214febe (bug 1331957)
Backed out changeset f74c7a543525 (bug 1331957)
Backed out changeset 6631f3582920 (bug 1331957)
Backed out changeset ccefeba51cf6 (bug 1331957)
Backed out changeset a84b26a07369 (bug 1331957)
Backed out changeset fc0b3a0ad1e5 (bug 1331957)
Backed out changeset bbcae89fd7c2 (bug 1331957)
Backed out changeset ffd70d960b9f (bug 1331957)
Backed out changeset a53ecc295eae (bug 1331957)
Backed out changeset d44a0be29686 (bug 1331957)
Backed out changeset a01a373da6a8 (bug 1331957)
2017-02-03 11:16:08 +08:00
Ehsan Akhgari
8ac5b64b80 Bug 1331957 - Part 12: Remove -Lclang/lib from the LDFLAGS used to build the clang plugin; r=froydnj
This ensures that we correctly link against /usr/lib/libc++.1.dylib.
With this flag left in LDFLAGS, the linker would find libc++.1.dylib in
clang/lib, which would cause us to link against @rpath/libc++.1.dylib.
2017-02-02 20:21:00 -05:00
Carsten "Tomcat" Book
3ad97e202a merge mozilla-inbound to mozilla-central a=merge 2017-01-12 10:14:43 +01:00
Eric Rahm
453cad2d83 Bug 1322735 - Enable frame pointers on 32-bit windows builds. r=glandium
This universally disables FPO on win32.

MozReview-Commit-ID: AT9ozxGN0C5

--HG--
extra : rebase_source : 425284addb1a36843a2821dce23d3678a80bd203
2017-01-11 17:54:18 -08:00
Carsten "Tomcat" Book
ccfe5b9092 Merge mozilla-central to mozilla-inbound 2017-01-11 16:37:37 +01:00
Carsten "Tomcat" Book
a712d69adb merge mozilla-inbound to mozilla-central a=merge 2017-01-11 16:23:39 +01:00
Ryan VanderMeulen
eef71c204d Bug 1322027 - Don't disable hugepage support since it no longer causes PGO issues. 2017-01-11 09:04:48 -05:00
Jan Beich
37441c2712 Bug 1325246 - Unbreak build --with-system-icu after bug 1270146. r=glandium
MozReview-Commit-ID: Dob5wTmHgxn

--HG--
extra : rebase_source : 7505163d23978c4cbb308314ba78a7063199face
2016-12-22 01:42:19 +00:00
Phil Ringnalda
1c2d0d367f Backed out 3 changesets (bug 1322735) for ASan leaks and xpcshell/selftest.py failures
CLOSED TREE

Backed out changeset 01cfc71ce542 (bug 1322735)
Backed out changeset 84c729c41230 (bug 1322735)
Backed out changeset b419aaefae95 (bug 1322735)
2017-01-10 20:17:34 -08:00