host_byteorder.gni 892 B

123456789101112131415161718192021222324252627
  1. # Copyright (c) 2017 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. # This header file defines the "host_byteorder" variable.
  5. # Not that this is currently used only for building v8.
  6. # The chromium code generally assumes little-endianness.
  7. declare_args() {
  8. host_byteorder = "undefined"
  9. }
  10. # Detect host byteorder
  11. # ppc64 can be either BE or LE
  12. if (host_cpu == "ppc64") {
  13. if (current_os == "aix") {
  14. host_byteorder = "big"
  15. } else {
  16. # Only use the script when absolutely necessary
  17. host_byteorder =
  18. exec_script("//build/config/get_host_byteorder.py", [], "trim string")
  19. }
  20. } else if (host_cpu == "ppc" || host_cpu == "s390" || host_cpu == "s390x" ||
  21. host_cpu == "mips" || host_cpu == "mips64") {
  22. host_byteorder = "big"
  23. } else {
  24. host_byteorder = "little"
  25. }