Linux is the only platform where we have a different optimization level
between normal and debug builds. That comes from bug 1368649, but was
not the original intent: the first landing for that bug actually set the
optimization level to -O2 for all non-PGO Linux builds, but that caused
build problems on the debug builds with the compiler used at the time.
Time has passed, compiler versions have been released, and, in fact,
back then we were still compiling with gcc for the shipped builds.
It's time to go with the original intent.
Differential Revision: https://phabricator.services.mozilla.com/D188896
Due to size limit of APK, we should use `-Oz` instead of `-O2` even if Nightly.
Actually, Nightly is `-O2` and Others (Beta and Release) are `-Oz`.
As long as I look perf data (bug 1831935 etc) after testing -O2, improvement is still
small (It seems to be small improvement of AndroidStartup only).
Also, this fix removes gcc support of GeckoView build since NDK removes gcc now.
Differential Revision: https://phabricator.services.mozilla.com/D185817
Use a new executable for the GMP process named "<App Name> Media Plugin Helper" so that the content processes (using the plugin-container executable) and the GMP process can be signed with different entitlements allowing for the use of more secure entitlements.
In order for the new executable to load the Widevine plugin, a change is needed in the codesigning infrastructure repo to generate the .sig file for the new executable.
To get the security benefits of using a new executable for GMP, additional changes are needed in the codesigning infrastructure repo to enable signing plugin-container and the new executable with a reduced set of entitlements.
The executable is a copy of plugin-container renamed as "<App Name> Media Plugin Helper" so it appears with a user friendly name in Activity Monitor. For example, "Firefox Media Plugin Helper". (The GMP process runs with limited privileges preventing it from setting its own "nice" process name.)
Pref off the change until the .sig file change lands and media playback has been validated on production builds.
Differential Revision: https://phabricator.services.mozilla.com/D175796
This includes AccessibleHandler, HandlerProvider, IGeckoCustom and the IAccessible2 COM proxy dll.
Even with the new architecture, we still use IAccessible2, but we no longer need a COM proxy because we aren't using COM across processes ourselves.
If clients want to use IAccessible2 across processes, they're responsible for registering a COM proxy themselves as with all other IAccessible2 applications.
Alternatively, they can rely on the IAccessible2 COM proxy which is included with Windows 10 and later.
Differential Revision: https://phabricator.services.mozilla.com/D177963
This includes AccessibleHandler, HandlerProvider, IGeckoCustom and the IAccessible2 COM proxy dll.
Even with the new architecture, we still use IAccessible2, but we no longer need a COM proxy because we aren't using COM across processes ourselves.
If clients want to use IAccessible2 across processes, they're responsible for registering a COM proxy themselves as with all other IAccessible2 applications.
Alternatively, they can rely on the IAccessible2 COM proxy which is included with Windows 10 and later.
Differential Revision: https://phabricator.services.mozilla.com/D177963
Use a new executable for the GMP process named "<App Name> Media Plugin Helper" so that the content processes (using the plugin-container executable) and the GMP process can be signed with different entitlements allowing for the use of more secure entitlements.
To get the benefits of using a new executable for GMP, additional changes are needed in the codesigning infrastructure repo to enable signing plugin-container and the new executable with a reduced set of entitlements.
The executable is built as media-plugin-helper and then renamed to "<App Name> Media Plugin Helper" so it appears with a user friendly name in Activity Monitor. For example, "Firefox Media Plugin Helper". (The GMP process runs with limited privileges preventing it from setting its own "nice" process name.)
Limit the change to Nightly at this time to allow validation of using a new executable and then enabling the strong entitlements.
Differential Revision: https://phabricator.services.mozilla.com/D175796
Without _USE_MATH_DEFINES, Windows' math.h doesn't define M_PI. Since _USE_MATH_DEFINES is defined globally, redundant definitions of _USE_MATH_DEFINES in moz.build files can be removed.
obj-build/dist/include/mozilla/ServoStyleConstsInlines.h:396:32: error: use of undeclared identifier 'M_PI'
obj-build/dist/include/mozilla/StaticPrefList_apz.h:133:22: error: use of undeclared identifier 'M_PI'
obj-build/dist/include/mozilla/gfx/PathHelpers.h:139:33: error: use of undeclared identifier 'M_PI'
Differential Revision: https://phabricator.services.mozilla.com/D177590
First, the setup in js/src/old-configure.in was actually doing nothing
for js, since there weren't corresponding AC_SUBST/AC_SUBST_LIST.
As mentioned in the commit message for bug 1274334, libmozglue contains
operator new/operator delete overrides, so this didn't cause much harm,
especially because js has limited use of plain operator new.
Second, we take on the occasion to move the definitions to python
configure. To match when the STL wrapping was enabled, we move it to
toolkit/moz.configure, which is included by all Gecko-based projects,
but explicitly not by standalone js (preserving its previous behavior,
which is actually desirable for standalone js), and not by other
projects such as tools/crashreporter/injects.
Differential Revision: https://phabricator.services.mozilla.com/D175980
First, the setup in js/src/old-configure.in was actually doing nothing
for js, since there weren't corresponding AC_SUBST/AC_SUBST_LIST.
As mentioned in the commit message for bug 1274334, libmozglue contains
operator new/operator delete overrides, so this didn't cause much harm,
especially because js has limited use of plain operator new.
Second, we take on the occasion to move the definitions to python
configure. To match when the STL wrapping was enabled, we move it to
toolkit/moz.configure, which is included by all Gecko-based projects,
but explicitly not by standalone js (preserving its previous behavior,
which is actually desirable for standalone js), and not by other
projects such as tools/crashreporter/injects.
Differential Revision: https://phabricator.services.mozilla.com/D175980
Bug 1799002 meant to remove the Android parts, but removed more,
introducing a regression on non-developer builds. We restore the
parts of old-configure.in that were removed, but leave out the
Android parts.
Differential Revision: https://phabricator.services.mozilla.com/D176484
Practically speaking, this doesn't make a huge difference, because
libmozglue contains operator new/operator delete overrides. This will
enable inlining opportunities, though.
It is worth noting that there's equivalent code in
js/src/old-configure.in but it's left as is because it is actually no-op
at the moment. This will be fixed in bug 1829049.
The check for __EXCEPTIONS is replaced with __cpp_exceptions because the
former is defined for any type of exception, including ObjC exceptions,
while the latter is defined for C++ exceptions only.
Differential Revision: https://phabricator.services.mozilla.com/D175976
The underlying Android-Gradle plugin bug has been addressed, so we no
longer see the issue, and therefore we don't need this complicated
"library set generation ID" workaround at all!
Differential Revision: https://phabricator.services.mozilla.com/D175167
Practically speaking, this doesn't make a huge difference, because
libmozglue contains operator new/operator delete overrides. This will
enable inlining opportunities, though.
It is worth noting that there's equivalent code in
js/src/old-configure.in but it's left as is because it is actually no-op
at the moment. This will be fixed in bug 1829049.
The check for __EXCEPTIONS is replaced with __cpp_exceptions because the
former is defined for any type of exception, including ObjC exceptions,
while the latter is defined for C++ exceptions only.
Differential Revision: https://phabricator.services.mozilla.com/D175976
Practically speaking, this doesn't make a huge difference, because
libmozglue contains operator new/operator delete overrides. This will
enable inlining opportunities, though.
It is worth noting that there's equivalent code in
js/src/old-configure.in but it's left as is because it is actually no-op
at the moment. This will be fixed in bug 1829049.
The check for __EXCEPTIONS is replaced with __cpp_exceptions because the
former is defined for any type of exception, including ObjC exceptions,
while the latter is defined for C++ exceptions only.
Differential Revision: https://phabricator.services.mozilla.com/D175976
Bug 1796518 removed the build-id on local builds because it's faster to
do so, but it may be desirable to still have /some/ build-id, even if
it's random, so use a uuid on local builds instead of none at all.
Differential Revision: https://phabricator.services.mozilla.com/D166615
While we're here, make the setup more consistent across host/target
c/c++, and remove the C compiler warning flags from the C linker flags,
where they are irrelevant.
Differential Revision: https://phabricator.services.mozilla.com/D159358
This moves the manual addition of some flags from old-configure to
python configure, and disables the set of flags that still trigger a
bunch of warnings (which -Werror turns into bustage).
Differential Revision: https://phabricator.services.mozilla.com/D144406