Cindy Liu | 43879e4 | 2023-10-18 11:18:03 -0700 | [diff] [blame^] | 1 | # Copyright 2023 Google LLC |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://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, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
Cindy Liu | 7764559 | 2023-06-07 19:23:38 -0700 | [diff] [blame] | 15 | package(default_visibility = ["//visibility:public"]) |
| 16 | |
Cindy Liu | 5706c8a | 2023-09-15 16:34:57 -0700 | [diff] [blame] | 17 | filegroup( |
| 18 | name = "kelvin_linker", |
| 19 | srcs = ["kelvin.ld"], |
| 20 | ) |
| 21 | |
| 22 | cc_library( |
| 23 | name = "crt", |
| 24 | srcs = [ |
| 25 | "crt.S", |
| 26 | "kelvin_gloss.cc", |
| 27 | "kelvin_start.S", |
| 28 | ], |
| 29 | target_compatible_with = ["@kelvin_sw//platforms/cpu:kelvin"], |
| 30 | deps = [ |
| 31 | ":crt_header", |
| 32 | ], |
| 33 | ) |
| 34 | |
| 35 | # Used by binaries with their own starting asm. |
| 36 | cc_library( |
| 37 | name = "crt_gloss_only", |
| 38 | srcs = [ |
| 39 | "kelvin_gloss.cc", |
| 40 | ], |
| 41 | target_compatible_with = ["@kelvin_sw//platforms/cpu:kelvin"], |
| 42 | deps = [ |
| 43 | ":crt_header", |
| 44 | ], |
| 45 | ) |
Cindy Liu | 38a2a67 | 2023-06-14 17:58:59 -0700 | [diff] [blame] | 46 | |
| 47 | cc_library( |
| 48 | name = "crt_header", |
| 49 | hdrs = [ |
| 50 | "kelvin.h", |
| 51 | "kelvin_intrinsics.h", |
Alex Van Damme | c2239bd | 2023-09-21 15:16:48 -0700 | [diff] [blame] | 52 | "printf_traits.h", |
Cindy Liu | 38a2a67 | 2023-06-14 17:58:59 -0700 | [diff] [blame] | 53 | ], |
| 54 | ) |