Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / pigweed / repo / pw_toolchain / dummy / BUILD.gn
1 # Copyright 2020 The Pigweed Authors
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 # use this file except in compliance with the License. You may obtain a copy of
5 # the License at
6 #
7 #     https://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations under
13 # the License.
14
15 import("//build_overrides/pigweed.gni")
16
17 import("$dir_pw_toolchain/universal_tools.gni")
18
19 # A dummy toolchain which is set as the default for Pigweed. This is never used;
20 # the top-level BUILD.gn enumerates the toolchains for each build.
21 toolchain("dummy") {
22   tool("stamp") {
23     forward_variables_from(pw_universal_stamp, "*")
24   }
25
26   tool("copy") {
27     forward_variables_from(pw_universal_copy, "*")
28   }
29
30   # If the user tries to build a target with the default toolchain, run a script
31   # printing out the error.
32   _bad_toolchain_command =
33       "python " +
34       rebase_path("$dir_pw_toolchain/py/pw_toolchain/bad_toolchain.py")
35
36   tool("asm") {
37     command = _bad_toolchain_command
38     outputs =
39         [ "{{source_out_dir}}/{{target_output_name}}.{{source_file_part}}.o" ]
40   }
41
42   tool("cc") {
43     command = _bad_toolchain_command
44     outputs =
45         [ "{{source_out_dir}}/{{target_output_name}}.{{source_file_part}}.o" ]
46   }
47
48   tool("cxx") {
49     command = _bad_toolchain_command
50     outputs =
51         [ "{{source_out_dir}}/{{target_output_name}}.{{source_file_part}}.o" ]
52   }
53
54   tool("link") {
55     command = _bad_toolchain_command
56     outputs = [ "{{output_dir}}/{{target_output_name}}{{output_extension}}" ]
57   }
58
59   tool("alink") {
60     command = _bad_toolchain_command
61     outputs = [ "{{output_dir}}/{{target_output_name}}{{output_extension}}" ]
62   }
63
64   tool("solink") {
65     command = _bad_toolchain_command
66     outputs = [ "{{output_dir}}/{{target_output_name}}{{output_extension}}" ]
67   }
68 }