xref: /llvm-project/utils/bazel/llvm-project-overlay/clang/include/clang/Config/config.h (revision 5f254eb05566f5b400a212ae77117a9efd9019a1)
1 /*===------- clang/Config/config.h - llvm configuration -----------*- C -*-===*/
2 /*                                                                            */
3 /* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
4 /* Exceptions.                                                                */
5 /* See https://llvm.org/LICENSE.txt for license information.                  */
6 /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
7 /*                                                                            */
8 /*===----------------------------------------------------------------------===*/
9 
10 /* This is a manual port of config.h.cmake for the symbols that do not change
11    based on platform. Those that do change should not be defined here and
12    instead use Bazel cc_library defines. Some attempt has been made to extract
13    such symbols that do vary based on platform (for the platforms we care about)
14    into Bazel defines, but it is by no means complete, so if you see something
15    that looks wrong, it probably is. */
16 
17 #ifdef CLANG_CONFIG_H
18 #error config.h can only be included once
19 #else
20 #define CLANG_CONFIG_H
21 
22 /* Bug report URL. */
23 #define BUG_REPORT_URL "https://github.com/llvm/llvm-project/issues/"
24 
25 /* Default to -fPIE and -pie on Linux. */
26 #define CLANG_DEFAULT_PIE_ON_LINUX 1
27 
28 /* Default linker to use. */
29 #define CLANG_DEFAULT_LINKER ""
30 
31 /* Default C++ stdlib to use. */
32 #define CLANG_DEFAULT_CXX_STDLIB ""
33 
34 /* Default runtime library to use. */
35 #define CLANG_DEFAULT_RTLIB ""
36 
37 /* Default unwind library to use. */
38 #define CLANG_DEFAULT_UNWINDLIB ""
39 
40 /* Default objcopy to use */
41 #define CLANG_DEFAULT_OBJCOPY "objcopy"
42 
43 /* Default OpenMP runtime used by -fopenmp. */
44 #define CLANG_DEFAULT_OPENMP_RUNTIME "libomp"
45 
46 /* Default architecture for SystemZ. */
47 #define CLANG_SYSTEMZ_DEFAULT_ARCH "z10"
48 
49 /* Multilib basename for libdir. */
50 #define CLANG_INSTALL_LIBDIR_BASENAME "lib"
51 
52 /* Relative directory for resource files */
53 #define CLANG_RESOURCE_DIR ""
54 
55 /* Directories clang will search for headers */
56 #define C_INCLUDE_DIRS ""
57 
58 /* Directories clang will search for configuration files */
59 /* #undef CLANG_CONFIG_FILE_SYSTEM_DIR */
60 /* #undef CLANG_CONFIG_FILE_USER_DIR */
61 
62 /* Default <path> to all compiler invocations for --sysroot=<path>. */
63 #define DEFAULT_SYSROOT ""
64 
65 /* Directory where gcc is installed. */
66 #define GCC_INSTALL_PREFIX ""
67 
68 /* Define if we have libxml2 */
69 /* #undef CLANG_HAVE_LIBXML */
70 
71 /* Define if we have sys/resource.h (rlimits) */
72 /* CLANG_HAVE_RLIMITS defined conditionally below */
73 
74 /* Define if we have dlfcn.h */
75 #define CLANG_HAVE_DLFCN_H 1
76 
77 /* Define if dladdr() is available on this platform. */
78 #define CLANG_HAVE_DLADDR 1
79 
80 /* Linker version detected at compile time. */
81 /* #undef HOST_LINK_VERSION */
82 
83 /* pass --build-id to ld */
84 /* #undef ENABLE_LINKER_BUILD_ID */
85 
86 /* enable x86 relax relocations by default */
87 #define ENABLE_X86_RELAX_RELOCATIONS 1
88 
89 /* enable IEEE binary128 as default long double format on PowerPC Linux. */
90 #define PPC_LINUX_DEFAULT_IEEELONGDOUBLE 0
91 
92 /* Enable the experimental new pass manager by default */
93 #define ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER 0
94 
95 /* Enable each functionality of modules */
96 #define CLANG_ENABLE_ARCMT 1
97 #define CLANG_ENABLE_OBJC_REWRITER 1
98 #define CLANG_ENABLE_STATIC_ANALYZER 1
99 
100 /* Spawn a new process clang.exe for the CC1 tool invocation, when necessary */
101 #define CLANG_SPAWN_CC1 0
102 
103 /* Whether to enable opaque pointers by default */
104 #define CLANG_ENABLE_OPAQUE_POINTERS_INTERNAL 1
105 
106 /* Directly provide definitions here behind platform preprocessor definitions.
107  * The preprocessor conditions are sufficient to handle all of the configuration
108  * on platforms targeted by Bazel, and defining these here more faithfully
109  * matches how the users of this header expect things to work with CMake.
110  */
111 
112 #ifndef _WIN32
113 #define CLANG_HAVE_RLIMITS 1
114 #endif
115 
116 #endif
117