diff --git a/build/toolchain/linux/BUILD.gn b/build/toolchain/linux/BUILD.gn index ee23fe7d8a..b345f54f31 100644 --- a/build/toolchain/linux/BUILD.gn +++ b/build/toolchain/linux/BUILD.gn @@ -40,11 +40,12 @@ gcc_toolchain("clang_x86") { } cc = "${compiler_prefix}$prefix/clang" cxx = "${compiler_prefix}$prefix/clang++" - readelf = "readelf" - nm = "nm" - ar = "ar" + + readelf = "${prefix}/llvm-readelf" + nm = "${prefix}/llvm-nm" + ar = "${prefix}/llvm-ar" ld = cxx - strip = "strip" + llvm_objcopy = "${prefix}/llvm-objcopy" toolchain_cpu = "x86" toolchain_os = "linux" @@ -52,13 +53,15 @@ gcc_toolchain("clang_x86") { } gcc_toolchain("x86") { - cc = "${compiler_prefix}gcc" - cxx = "${compiler_prefix}g++" + prefix = "" + cc = "${compiler_prefix}${prefix}gcc" + cxx = "${compiler_prefix}${prefix}g++" - readelf = "readelf" - nm = "nm" - ar = "ar" + readelf = "${prefix}readelf" + nm = "${prefix}nm" + ar = "${prefix}ar" ld = cxx + strip = "${prefix}strip" toolchain_cpu = "x86" toolchain_os = "linux" @@ -75,11 +78,11 @@ gcc_toolchain("clang_x64") { cc = "${compiler_prefix}$prefix/clang" cxx = "${compiler_prefix}$prefix/clang++" - readelf = "readelf" - nm = "nm" - ar = "ar" + readelf = "${prefix}/llvm-readelf" + nm = "${prefix}/llvm-nm" + ar = "${prefix}/llvm-ar" ld = cxx - strip = "strip" + llvm_objcopy = "${prefix}/llvm-objcopy" toolchain_cpu = "x64" toolchain_os = "linux" @@ -108,13 +111,15 @@ gcc_toolchain("clang_arm64") { } gcc_toolchain("x64") { - cc = "${compiler_prefix}gcc" - cxx = "${compiler_prefix}g++" + prefix = "" + cc = "${compiler_prefix}${prefix}gcc" + cxx = "${compiler_prefix}${prefix}g++" - readelf = "readelf" - nm = "nm" - ar = "ar" + readelf = "${prefix}readelf" + nm = "${prefix}nm" + ar = "${prefix}ar" ld = cxx + strip = "${prefix}strip" toolchain_cpu = "x64" toolchain_os = "linux"