Bug 1479484 - Part 2: Expose endianness from buildconfig, r=froydnj
authorNika Layzell <nika@thelayzells.com>
Wed, 01 Aug 2018 01:17:24 -0400
changeset 429732 a509c3520b77d0b2a813b641904fc2e6f03805a3
parent 429731 20668aaf20ebbef0dad5b18b0db001bee589da3e
child 429733 fc662efea520c6a0b1761b1f6bdbd909162cf799
push id34372
push usernerli@mozilla.com
push dateThu, 02 Aug 2018 08:55:28 +0000
treeherdermozilla-central@bd79b07f57a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1479484
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1479484 - Part 2: Expose endianness from buildconfig, r=froydnj Summary: This information is already being detected, and it will allow us to avoid byteorder swaps in XPT on big-endian systems. This patch allows buildconfig to detect endianness. It may make sense in the future to also expose this endianness as a define, so we can avoid custom detection such as in /mfbt/EndianUtils.h: https://searchfox.org/mozilla-central/rev/196560b95f191b48ff7cba7c2ba9237bba6b5b6a/mfbt/EndianUtils.h#85-148 Depends On D2614 Reviewers: froydnj! Tags: #secure-revision Bug #: 1479484 Differential Revision: https://phabricator.services.mozilla.com/D2615
build/moz.configure/init.configure
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -867,16 +867,17 @@ add_old_configure_assignment('OS_ARCH',
 set_config('OS_TEST', target_variables.OS_TEST)
 add_old_configure_assignment('OS_TEST',
                              target_variables.OS_TEST)
 set_config('CPU_ARCH', target.cpu)
 add_old_configure_assignment('CPU_ARCH', target.cpu)
 set_config('INTEL_ARCHITECTURE', target_variables.INTEL_ARCHITECTURE)
 set_config('TARGET_CPU', target.raw_cpu)
 set_config('TARGET_OS', target.raw_os)
+set_config('TARGET_ENDIANNESS', target.endianness)
 
 
 @depends(host)
 def host_variables(host):
     if host.kernel == 'kFreeBSD':
         os_arch = 'GNU_kFreeBSD'
     else:
         os_arch = host.kernel