diff options
Diffstat (limited to 'third_party/yasm')
-rw-r--r-- | third_party/yasm/BUILD.gn | 8 | ||||
-rw-r--r-- | third_party/yasm/yasm_assemble.gni | 14 |
2 files changed, 9 insertions, 13 deletions
diff --git a/third_party/yasm/BUILD.gn b/third_party/yasm/BUILD.gn index 3c5215e..a09a495 100644 --- a/third_party/yasm/BUILD.gn +++ b/third_party/yasm/BUILD.gn @@ -30,18 +30,14 @@ if (current_toolchain == host_toolchain) { # Various files referenced by multiple targets. yasm_gen_include_dir = "$target_gen_dir/include" - yasm_os = os - if (is_chromeos) { - yasm_os = "linux" - } - config_makefile = "source/config/$yasm_os/Makefile" + config_makefile = "source/config/$host_os/Makefile" version_file = "version.mac" import("//build/compiled_action.gni") config("yasm_config") { include_dirs = [ - "source/config/$yasm_os", + "source/config/$host_os", "source/patched-yasm", ] defines = [ "HAVE_CONFIG_H" ] diff --git a/third_party/yasm/yasm_assemble.gni b/third_party/yasm/yasm_assemble.gni index 56d7e11a..1a84d51 100644 --- a/third_party/yasm/yasm_assemble.gni +++ b/third_party/yasm/yasm_assemble.gni @@ -42,13 +42,13 @@ # } if (is_mac || is_ios) { - if (cpu_arch == "x86") { + if (current_cpu == "x86") { _yasm_flags = [ "-fmacho32", "-m", "x86", ] - } else if (cpu_arch == "x64") { + } else if (current_cpu == "x64") { _yasm_flags = [ "-fmacho64", "-m", @@ -56,13 +56,13 @@ if (is_mac || is_ios) { ] } } else if (is_posix) { - if (cpu_arch == "x86") { + if (current_cpu == "x86") { _yasm_flags = [ "-felf32", "-m", "x86", ] - } else if (cpu_arch == "x64") { + } else if (current_cpu == "x64") { _yasm_flags = [ "-DPIC", "-felf64", @@ -71,14 +71,14 @@ if (is_mac || is_ios) { ] } } else if (is_win) { - if (cpu_arch == "x86") { + if (current_cpu == "x86") { _yasm_flags = [ "-DPREFIX", "-fwin32", "-m", "x86", ] - } else if (cpu_arch == "x64") { + } else if (current_cpu == "x64") { _yasm_flags = [ "-fwin64", "-m", @@ -99,7 +99,7 @@ template("yasm_assemble") { # Only depend on YASM on x86 systems. Force compilation of .asm files for # ARM to fail. - assert(cpu_arch == "x86" || cpu_arch == "x64") + assert(current_cpu == "x86" || current_cpu == "x64") action_name = "${target_name}_action" source_set_name = target_name |