1 # This file is licensed under the Apache License v2.0 with LLVM Exceptions.
2 # See https://llvm.org/LICENSE.txt for license information.
3 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 default_visibility = ["//visibility:public"],
7 features = ["layering_check"],
15 "@platforms//os:linux": [
16 "COMPILER_RT_HAS_ATOMICS=1",
17 "COMPILER_RT_HAS_FCNTL_LCK=1",
18 "COMPILER_RT_HAS_UNAME=1",
20 # Will raise error unless supported platforms.
22 target_compatible_with = select({
23 "@platforms//os:linux": [],
24 "//conditions:default": ["@platforms//:incompatible"],
29 "lib/profile/WindowsMMap.c",
40 exclude = WIN32_ONLY_FILES,
42 "@platforms//os:windows": WIN32_ONLY_FILES,
43 "//conditions:default": [],
46 "include/profile/*.h",
47 "include/profile/*.inc",
59 name = "orc_rt_common_headers",
62 "lib/orc/bitmask_enum.h",
66 "lib/orc/endianness.h",
68 "lib/orc/executor_address.h",
69 "lib/orc/executor_symbol_def.h",
70 "lib/orc/extensible_rtti.h",
71 "lib/orc/interval_map.h",
72 "lib/orc/interval_set.h",
73 "lib/orc/jit_dispatch.h",
74 "lib/orc/record_section_tracker.h",
75 "lib/orc/simple_packed_serialization.h",
76 "lib/orc/stl_extras.h",
77 "lib/orc/string_pool.h",
78 "lib/orc/wrapper_function_utils.h",
80 strip_include_prefix = "lib/orc",
87 "lib/orc/dlfcn_wrapper.cpp",
88 "lib/orc/extensible_rtti.cpp",
89 "lib/orc/log_error_to_stderr.cpp",
90 "lib/orc/run_program_wrapper.cpp",
92 "@platforms//os:macos": [
93 "lib/orc/macho_platform.cpp",
94 "lib/orc/macho_platform.h",
95 "lib/orc/macho_tlv.arm64.S",
96 "lib/orc/macho_tlv.x86-64.S",
98 "@platforms//os:linux": [
99 "lib/orc/elfnix_platform.cpp",
100 "lib/orc/elfnix_platform.h",
101 "lib/orc/elfnix_tls.aarch64.S",
102 "lib/orc/elfnix_tls.ppc64.S",
103 "lib/orc/elfnix_tls.x86-64.S",
106 hdrs = glob(["include/orc_rt/*.h"]),
107 includes = ["include"],
110 ":orc_rt_common_headers",