Commit Graph

59 Commits

Author SHA1 Message Date
Nathan Froyd
18e78c6b0d Bug 1578825 - add a strict version check for the NDK version; r=nalexander
One less thing for configurations to vary is a good thing.  This change
also means that when we do NDK bumps that introduce some kind of weird
incompatible change, configuration with a newly-pulled tree and an old
NDK halts at configure, rather than giving weird build errors.

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

--HG--
extra : moz-landing-system : lando
2019-09-04 19:20:39 +00:00
Nathan Froyd
f29b892aa0 Bug 1578471 - consolidate NDK version detection; r=nalexander
We have an `ndk_version_major` and an `ndk_version_minor` that have a
lot of duplicated code in them.  We could factor them into a single
function, but it seems better to just pull their logic into `ndk_version`
directly, rearranging that function to be IMHO more understandable.

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

--HG--
extra : moz-landing-system : lando
2019-09-03 17:17:31 +00:00
Makoto Kato
44c1524bcd Bug 1568455 - Detect Android NDK on Windows. r=nalexander
Toolchain path for Windows version is `<NDK ROOT>/toolchains/llvm/prebuilt/windows-x86_64` etc, so it isn't '`winnt`.
So we has to replace `host.kernel.lower()` with `windows`.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 15:54:07 +00:00
Makoto Kato
f8907645db Bug 1568452 - Move ANDROID and ANDROID_PLATFORM to moz.configure r=froydnj
ANDROID_SOURCE is for gonk, so it is unnecessary now.

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

--HG--
extra : moz-landing-system : lando
2019-07-24 13:41:20 +00:00
Mike Hommey
ff4ab7e28f Bug 1557855 - Use a sensible default for --with-android-ndk. r=nalexander
Use the same logic as for --with-android-sdk to use the NDK downloaded
by mach bootstrap by default.

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

--HG--
extra : moz-landing-system : lando
2019-06-07 22:23:37 +00:00
Mike Hommey
7dcedba0bf Bug 1557213 - Don't try to use NDK clang. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D33902

--HG--
extra : moz-landing-system : lando
2019-06-07 00:40:10 +00:00
Mike Hommey
69a2e6fc69 Bug 1510897 - Add -stdlib=libstdc++ to the compiler flags on Android. r=froydnj
There is no concern that the Android NDK clang may not support it, as
the flag was added in clang 2.9. The flag is also not supported with
GCC, which is not ideal, but we already crossed that bridge at least
with -gcc-toolchain added in extra_toolchain_flags, which is not
supported by GCC either.

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

--HG--
extra : moz-landing-system : lando
2019-03-28 13:15:43 +00:00
Mike Hommey
ee64e5bdec Bug 1510897 - Separate Android C++ flags from the other Android toolchain flags. r=nalexander
We shouldn't pass those flags when building C. It doesn't matter /too/
much currently, but will in a subsequent change, which will introduce
a C++-only flag in stlport_cppflags.

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

--HG--
extra : moz-landing-system : lando
2019-03-27 22:05:04 +00:00
Mike Hommey
ef876da54d Bug 1526062 - Fix miscellaneous NameErrors lingering in the python configure code. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D19109

--HG--
extra : moz-landing-system : lando
2019-02-08 16:56:13 +00:00
Mike Hommey
e7713397bc Bug 1520402 - Require the android NDK when targetting Android, not when building Fennec. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D16671

--HG--
extra : moz-landing-system : lando
2019-01-17 04:14:50 +00:00
Mike Hommey
19f8d4666d Bug 1520677 - Remove unnecessary --help dependencies in python configure. r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D16777

--HG--
extra : moz-landing-system : lando
2019-01-17 03:34:54 +00:00
Cosmin Sabou
18aa3b4cff Backed out changeset bc6c2b781953 (bug 1520402) for Linux build bustages on test_toolchain_configure. CLOSED TREE 2019-01-17 02:06:08 +02:00
Mike Hommey
3ea720d026 Bug 1520402 - Require the android NDK when targetting Android, not when building Fennec. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D16671

--HG--
extra : moz-landing-system : lando
2019-01-16 23:26:51 +00:00
Mike Hommey
13b49eda02 Bug 1520340 - Use js_options instead of exported variables from old-configure for a few variables. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D16618

--HG--
extra : moz-landing-system : lando
2019-01-15 23:33:47 +00:00
Tooru Fujisawa
f3452023f8 Bug 1492716 - Part 2.1: Support empty string in help formatting rule and fixed some more cases. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D9631
2018-10-24 18:04:00 +09:00
Benjamin Bouvier
db0cd81fb4 Bug 1495669: Share bindgen flags globally; r=emilio, r=froydnj
--HG--
extra : rebase_source : 83bfa2a61e523048d0e618ed5920c4aa143a2582
extra : histedit_source : cfc8de67959c5a2dffc5fea3ee5be172bfc370e1%2C53a6b4c0de444b4a7ee04cdd015568069bca893a
2018-10-09 15:01:52 +02:00
Jim Chen
d968bd5148 Bug 1480834 - 2. Add x86-64 build support; r=nalexander
Add x86-64 as an option for Android builds in the build system.

Differential Revision: https://phabricator.services.mozilla.com/D4480
2018-09-13 12:09:25 -04:00
Jim Chen
054f1436df Bug 1480834 - 0. Drop mips and update NDK platform to 16; r=jchen
Differential Revision: https://phabricator.services.mozilla.com/D5602
2018-09-13 12:09:24 -04:00
Mike Hommey
f4f54e5aeb Bug 1482330 - Upgrade to Android NDK r17b and API level 16 (JB). r=snorp
We're currently using NDK r15c, which is rather old, and happens to come
with a buggy gold linker. Let's use a more recent NDK, with a fixed
linker.

Unfortunately, we're currently at NDK API level 9, which the newer NDK
doesn't provide for x86 anymore. But that corresponds to Gingerbread
(2.3), which we've long stopped supporting. On the SDK side, we already
dropped support of versions before Jelly Bean, so we can do the same on
the NDK side. That corresponds to API level 16. So let's just use that
as a baseline.

Another change in the newer NDK is that the target-name changed from
i386-linux-android to i686-linux-android, so adjust for that in the
android x86 mozconfigs.
2018-08-11 09:47:41 +09:00
Bogdan Tara
347da2ba78 Backed out changeset 003838e8d110 (bug 1482330) for Adnroid build bustages on mozalloc_abort.cpp CLOSED TREE 2018-08-11 03:22:58 +03:00
Mike Hommey
ee95699e6b Bug 1482330 - Upgrade to Android NDK r17b and API level 16 (JB). r=snorp
We're currently using NDK r15c, which is rather old, and happens to come
with a buggy gold linker. Let's use a more recent NDK, with a fixed
linker.

Unfortunately, we're currently at NDK API level 9, which the newer NDK
doesn't provide for x86 anymore. But that corresponds to Gingerbread
(2.3), which we've long stopped supporting. On the SDK side, we already
dropped support of versions before Jelly Bean, so we can do the same on
the NDK side. That corresponds to API level 16. So let's just use that
as a baseline.

Another change in the newer NDK is that the target-name changed from
i386-linux-android to i686-linux-android, so adjust for that in the
android x86 mozconfigs.
2018-08-11 06:50:21 +09:00
Jim Chen
b3c3de5de5 Bug 1428182 - 1. Support unified headers for Android builds; r=nalexander
NDK headers are grouped into a "sysroot" directory, which doesn't
contain architecture-specific bits, and a "system" directory, which
contains only the architecture-specific bits. Previously, both
directories are the same, under platforms/android-*/arch-*/. However,
with unified headers in NDK r16, the two are different, so we need to
support that in the Android build scripts.

Unified headers also rely on the build system defining the
__ANDROID_API__ macro, so we add support for that as well.

MozReview-Commit-ID: 9zBNQC3BRFl

--HG--
extra : rebase_source : 9ded282343df64d9cc4abcf7d7c6b03ac3423ff0
2018-01-30 14:08:22 -05:00
Cosmin Sabou
c6a0d55423 Backed out 11 changesets (bug 1428182) for build bustages on pixman-inlines.h:29:10 on a CLOSED TREE
Backed out changeset 84c767de6202 (bug 1428182)
Backed out changeset 429433caa78c (bug 1428182)
Backed out changeset c576e9d1f68f (bug 1428182)
Backed out changeset 092662eab5eb (bug 1428182)
Backed out changeset 4dd7eaff3ab5 (bug 1428182)
Backed out changeset fbbb0745b139 (bug 1428182)
Backed out changeset 1d1278b289b7 (bug 1428182)
Backed out changeset 55891ffb3768 (bug 1428182)
Backed out changeset 4655e1b1b237 (bug 1428182)
Backed out changeset 377eada51b3c (bug 1428182)
Backed out changeset 17c0e373d921 (bug 1428182)

--HG--
rename : ipc/chromium/src/third_party/libevent/patches/android-api-level.patch => ipc/chromium/src/third_party/libevent/patches/android-arc4random-buf.patch
2018-01-30 01:22:33 +02:00
Jim Chen
35691135a8 Bug 1428182 - 1. Support unified headers for Android builds; r=nalexander
NDK headers are grouped into a "sysroot" directory, which doesn't
contain architecture-specific bits, and a "system" directory, which
contains only the architecture-specific bits. Previously, both
directories are the same, under platforms/android-*/arch-*/. However,
with unified headers in NDK r16, the two are different, so we need to
support that in the Android build scripts.

Unified headers also rely on the build system defining the
__ANDROID_API__ macro, so we add support for that as well.

MozReview-Commit-ID: 9zBNQC3BRFl

--HG--
extra : rebase_source : 36c9d4d5625fecbbe2485668811f85f9d94372d5
2018-01-29 17:38:11 -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
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
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
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
Sylvestre Ledru
816ba0c177 Bug 1406668 - Make build/moz.configure/*.configure compliant to the pep8 format + add to the list of directories to check r=glandium
MozReview-Commit-ID: 89NxxGUVjHV

--HG--
extra : rebase_source : 278ceb2d7d31da086216288bd54688fe25faa03b
2017-10-12 15:22:59 +02:00
Sebastian Hengst
3980c1732a Backed out changeset 4dc78384cb58 (bug 1406668) for flake8 linting failures. r=backout
--HG--
extra : rebase_source : 20f93207038c76e2804f255e4ebfdd5e03a8f7cc
2017-10-12 15:08:35 +02:00
Sylvestre Ledru
a102c9f46a Bug 1406668 - Make build/moz.configure/*.configure compliant to the pep8 format + add to the list of directories to check r=glandium
MozReview-Commit-ID: 89NxxGUVjHV

--HG--
extra : rebase_source : 658301cb32e9c042cd1931456e4e7b8f475900bd
2017-10-11 16:28:29 +02:00
Sebastian Hengst
7a40cdf1bb Backed out changeset b526011049ee (bug 1406668) for linting failures. r=backout
--HG--
extra : amend_source : fe8373f9572300c7fd090f529c6957fbf905d9ef
2017-10-12 14:41:28 +02:00
Sylvestre Ledru
4e4de3339f Bug 1406668 - Make build/moz.configure/*.configure compliant to the pep8 format + add to the list of directories to check r=glandium
MozReview-Commit-ID: 89NxxGUVjHV

--HG--
extra : rebase_source : 3d22007ea6793961e7031603efe58cdc66e3c6c9
2017-10-11 16:28:29 +02:00
Makoto Kato
8ab65ab25c Bug 1397764 - Part 2. Generate BINDGEN_CFLAGS for Android. r=chmanchester
Building Fennec/Android uses cross compiler toolchain.  So we have to generate
clang options (include path for c++ headers and gcc headers, gcc-toolchain path and etc) from NDK path for bindgen.

The following options are required for android build.

  (from stlport_cppflags)
  -I$topsrcdir/android-ndk/sources/cxx-stl/llvm-libc++/libcxx/include
  -I$topsrcdir/android-ndk/sources/android/support/include
  -I$topsrcdir/android-ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/include"

  (others for clang)
  -isystem $topsrcdir/android-ndk/platforms/android-9/arch-arm/usr/include
  -gcc-toolchain $topsrcdir/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
  -I$topsrcdir/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9/include
  -I$topsrcdir/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9/include-fixed"

Also, since bindgen_cflags_defaults uses as default, some funcions requires '--help'.

MozReview-Commit-ID: 7zfhw3IxQ2W

--HG--
extra : rebase_source : 0ede4f0d1ec212cfe411f6abe0f55f4b0c70643d
2017-09-29 16:46:52 +09: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
08e9866266 Bug 1350822 - Remove --with-android-gnu-compiler-version. r=glandium
gcc 4.9 is the last version in Android NDK and our minimum requirement of gcc is 4.9+.  --with-android-gnu-compiler-version is unnecessary option because gcc version of Android is always 4.9.

MozReview-Commit-ID: 1sutqlvbQU5

--HG--
extra : rebase_source : 77e42aba81da5276bcddd945ea41895ce2461afa
2017-09-20 20:34:18 +09:00
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
Mike Hommey
17153e5c27 Bug 1314894 - Avoid path changes from b6be0e9e3e1e. r=chmanchester
Importing 'os' in python configure functions, on Windows, changes the
separate the various os.path functions use, and that can have
unexpected, badly handled, consequences. While on the long term, it is
desirable to make @imports('os') modify os.path to use the same base
functions as if there were no @imports, let's go with the simpler
workaround of restoring the non-{isfile,isdir,exists} os.path functions
from b6be0e9e3e1e.

--HG--
extra : rebase_source : a1857b5dce2aa818c72a77d0d9727ac6ce16cb8f
2016-11-04 06:50:43 +09:00
Mike Hommey
be15eb6990 Bug 1313306 - Remove --help dependencies from @dependable and delayed_getattr. r=chmanchester
This sadly requires to replace a few @dependendable to pass the lint
check.

--HG--
extra : rebase_source : e0fd1c6f104076ea9f2c3474aadb7bebdf9a7fd8
2016-10-27 15:00:51 +09:00