| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/ui.gni") | 5 import("//build/config/ui.gni") |
| 6 import("//mojo/public/mojo.gni") | 6 import("//mojo/public/mojo.gni") |
| 7 import("//mojo/public/mojo_application.gni") | 7 import("//mojo/public/mojo_application.gni") |
| 8 import("//mojo/public/tools/bindings/mojom.gni") | 8 import("//mojo/public/tools/bindings/mojom.gni") |
| 9 import("//mojo/tools/embed/rules.gni") | 9 import("//mojo/tools/embed/rules.gni") |
| 10 import("//testing/test.gni") | 10 import("//testing/test.gni") |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 ] | 76 ] |
| 77 | 77 |
| 78 data_deps = shell_common_data_deps | 78 data_deps = shell_common_data_deps |
| 79 } | 79 } |
| 80 } else { | 80 } else { |
| 81 executable("mojo_shell") { | 81 executable("mojo_shell") { |
| 82 sources = [ | 82 sources = [ |
| 83 "desktop/main.cc", | 83 "desktop/main.cc", |
| 84 ] | 84 ] |
| 85 | 85 |
| 86 deps = shell_common_deps | 86 deps = shell_common_deps + [ ":mojo_shell_child_32_bit" ] |
| 87 | 87 |
| 88 data_deps = shell_common_data_deps | 88 data_deps = shell_common_data_deps |
| 89 } | 89 } |
| 90 } | 90 } |
| 91 | 91 |
| 92 executable("mojo_shell_child") { | 92 executable("mojo_shell_child") { |
| 93 sources = [ | 93 sources = [ |
| 94 "child_main.cc", | 94 "child_main.cc", |
| 95 ] | 95 ] |
| 96 | 96 |
| 97 deps = [ | 97 deps = [ |
| 98 ":child_controller_bindings", | 98 ":child_controller_bindings", |
| 99 ":common_lib", | 99 ":common_lib", |
| 100 "//base", | 100 "//base", |
| 101 "//base/allocator", | 101 "//base/allocator", |
| 102 "//build/config/sanitizers:deps", | 102 "//build/config/sanitizers:deps", |
| 103 "//mojo/edk/system", | 103 "//mojo/edk/system", |
| 104 "//mojo/environment:chromium", | 104 "//mojo/environment:chromium", |
| 105 "//mojo/message_pump", | 105 "//mojo/message_pump", |
| 106 ] | 106 ] |
| 107 } | 107 } |
| 108 |
| 109 if (current_cpu == "x86") { |
| 110 # The 32-bit version of the mojo_shell_child should be accessible in the |
| 111 # root build directory, just like the regular mojo_shell_child, so that |
| 112 # the 32-bit version can be accessed by simply adding a suffix to the path. |
| 113 copy("mojo_shell_child_32_bit_copy") { |
| 114 sources = [ |
| 115 "${root_out_dir}/mojo_shell_child", |
| 116 ] |
| 117 outputs = [ |
| 118 "${root_build_dir}/mojo_shell_child_32", |
| 119 ] |
| 120 deps = [ |
| 121 ":mojo_shell_child", |
| 122 ] |
| 123 } |
| 124 } |
| 125 |
| 126 group("mojo_shell_child_32_bit") { |
| 127 # This group is required to run any 32-bit child process. |
| 128 deps = [] |
| 129 if ((target_cpu == "x64" || target_cpu == "x86") && is_linux) { |
| 130 # The toolchain is hardcoded as 32-bit clang here -- although it must |
| 131 # be 32 bit (for nonsfi), it assumes clang. Ideally, the toolchain would |
| 132 # be defined as the 32 bit variant of whatever is being used (be it clang, |
| 133 # gcc, or something else). |
| 134 deps = [ |
| 135 ":mojo_shell_child_32_bit_copy(//build/toolchain/linux:clang_x86)", |
| 136 ] |
| 137 } |
| 138 } |
| 108 } # !mojo_use_prebuilt_mojo_shell | 139 } # !mojo_use_prebuilt_mojo_shell |
| 109 | 140 |
| 110 # Files used both by mojo_shell and mojo_shell_child (and tests). | 141 # Files used both by mojo_shell and mojo_shell_child (and tests). |
| 111 source_set("common_lib") { | 142 source_set("common_lib") { |
| 112 sources = [ | 143 sources = [ |
| 113 "child_switches.cc", | 144 "child_switches.cc", |
| 114 "child_switches.h", | 145 "child_switches.h", |
| 115 "init.cc", | 146 "init.cc", |
| 116 "init.h", | 147 "init.h", |
| 117 ] | 148 ] |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 "${root_out_dir}/libmojo_shell.so", | 642 "${root_out_dir}/libmojo_shell.so", |
| 612 ] | 643 ] |
| 613 } else { | 644 } else { |
| 614 sources += [ "${root_out_dir}/mojo_shell" ] | 645 sources += [ "${root_out_dir}/mojo_shell" ] |
| 615 } | 646 } |
| 616 | 647 |
| 617 outputs = [ | 648 outputs = [ |
| 618 "${root_out_dir}/symbols/{{source_file_part}}", | 649 "${root_out_dir}/symbols/{{source_file_part}}", |
| 619 ] | 650 ] |
| 620 } | 651 } |
| OLD | NEW |