compiler-rt-adjust-paths.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. diff --git a/build/config/clang/BUILD.gn b/build/config/clang/BUILD.gn
  2. index d4de2e0cca0..57359c32121 100644
  3. --- a/build/config/clang/BUILD.gn
  4. +++ b/build/config/clang/BUILD.gn
  5. @@ -130,12 +130,15 @@ template("clang_lib") {
  6. } else if (is_linux || is_chromeos) {
  7. if (current_cpu == "x64") {
  8. _dir = "x86_64-unknown-linux-gnu"
  9. + _suffix = "-x86_64"
  10. } else if (current_cpu == "x86") {
  11. _dir = "i386-unknown-linux-gnu"
  12. + _suffix = "-i386"
  13. } else if (current_cpu == "arm") {
  14. _dir = "armv7-unknown-linux-gnueabihf"
  15. } else if (current_cpu == "arm64") {
  16. _dir = "aarch64-unknown-linux-gnu"
  17. + _suffix = "-aarch64"
  18. } else {
  19. assert(false) # Unhandled cpu type
  20. }
  21. @@ -166,6 +169,11 @@ template("clang_lib") {
  22. assert(false) # Unhandled target platform
  23. }
  24. + # Bit of a hack to make this find builtins from compiler-rt >= 16
  25. + if (is_linux || is_chromeos) {
  26. + _dir = "linux"
  27. + }
  28. +
  29. _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib"
  30. _lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}"
  31. libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ]