lucenaBAL
2.0.0.20
Lucena Build Abstraction Library for C++
|
Describes aspects of the build-time environment relevant to library clients. More...
LBAL_NAME | |
These macros resolve to human-readable strings that identify the specified entities. If the entity has a version value associated with it, such as a compiler does, the string -may- include that version, but it is not required to do so. It is important to understand that since these values are generated in a header at compile time, and so they will change; if it is desired to cache the value, e.g., to report the compiler a library was built with in an executable that links to it, it will be necessary to cache it yourself, e.g., by storing the character array in a string with external storage in a source file in the library and providing an accessor to it. Note that it is not safe to use these for comparisons, either directly or in parsed form, as their format is not guaranteed. While these are intended strictly for reporting, there are other macros more appropriate for testing. | |
#define | LBAL_NAME_TARGET_CPU |
#define | LBAL_NAME_TARGET_OS |
#define | LBAL_NAME_COMPILER |
#define | LBAL_NAME_STANDARD_LIBRARY |
LBAL_TARGET_COMPILER | |
Report 1 or 0 depending on which macros match the compiler used to build the code. These identifers take the place of direct querying, as some compilers are in the habit of self-identifying as something else, and it can be challenging to suss out their actual identities. These are not generally useful, as there’s typically another, better mechanism for addressing whatever issue these can resolve, but they’re here for when nothing else will do. Note that if you also need version information, you’ll have to resort to direct querying, though it may still sensible to filter first on these for the aforementioned reason. Generally, a given compiler will match at least two tokens: one identifying the rough compiler “family” to which it belongs, and one that identifies it more uniquely. SEEME These are blunt instruments. In particular, there may be no differentiation between frontened (e.g., c1xx or clang) and backend (e.g., c2 or llvm). In practice, this mattered more when c2/clang was a thing, but seems less important now. We’ll consider revisiting if the extra granularity turns out to be useful. | |
#define | LBAL_TARGET_COMPILER_CLANG |
The compiler being used is an llvm/clang derivative. More... | |
#define | LBAL_TARGET_COMPILER_VANILLA_CLANG |
The compiler being used is pure llvm/clang. More... | |
#define | LBAL_TARGET_COMPILER_APPLE_CLANG |
The compiler being used is the llvm/clang variant shipped with Apple’s Xcode. More... | |
#define | LBAL_TARGET_COMPILER_GCC |
The compiler being used is a gcc derivative. More... | |
#define | LBAL_TARGET_COMPILER_VANILLA_GCC |
The compiler being used is pure gcc. More... | |
#define | LBAL_TARGET_COMPILER_MSVC |
The compiler being used is an MSVC derivative. More... | |
#define | LBAL_TARGET_COMPILER_VANILLA_MSVC |
The compiler being used is pure MSVC. More... | |
LBAL_TARGET_STANDARD_LIBRARY | |
Report 1 or 0 depending on which mutually exclusive macro matches the C++ Standard Library used to build the code. This takes the place of direct querying, as this may not even be an option in some cases. These are not generally useful, as there’s typically another, better mechanism for solving whatever this is meant to solve, but they’re here for when nothing else will do. Note that if you also need version information, you’ll have to resort to direct querying. | |
#define | LBAL_TARGET_STANDARD_LIBRARY_APPLE_LIBCPP |
C++ Standard Library implementation is Apple’s libc++. More... | |
#define | LBAL_TARGET_STANDARD_LIBRARY_LIBCPP |
C++ Standard Library implementation is libc++. More... | |
#define | LBAL_TARGET_STANDARD_LIBRARY_MSVC |
C++ Standard Library implementation is Microsoft’s. More... | |
#define | LBAL_TARGET_STANDARD_LIBRARY_LIBSTDCPP |
C++ Standard Library implementation is libstdc++. More... | |
LBAL_TARGET_CPU_FAMILY | |
Specify roughly which microprocessor family code is being generated for. At most one of these is 1, the rest are 0.
| |
#define | LBAL_TARGET_CPU_FAMILY_ARM |
#define | LBAL_TARGET_CPU_FAMILY_X86 |
LBAL_TARGET_CPU | |
Specify for which microprocessor instruction set code is being generated. At most one of these is 1, the rest are 0.
| |
#define | LBAL_TARGET_CPU_ARM |
#define | LBAL_TARGET_CPU_ARM_64 |
#define | LBAL_TARGET_CPU_X86 |
#define | LBAL_TARGET_CPU_X86_64 |
#define | LBAL_TARGET_CPU_IA64 |
LBAL_TARGET_VEC | |
Specify which vector instruction set is being generated, if any. Multiple conditionals may be true, but some are mutually exclusive.
| |
#define | LBAL_TARGET_VEC_SSE |
#define | LBAL_TARGET_VEC_SSE2 |
#define | LBAL_TARGET_VEC_SSE3 |
#define | LBAL_TARGET_VEC_SSE41 |
#define | LBAL_TARGET_VEC_SSE42 |
#define | LBAL_TARGET_VEC_AVX |
#define | LBAL_TARGET_VEC_AVX2 |
LBAL_TARGET_OS | |
Specify which Operating System code is being generated for. At most one of the these is 1, the rest are 0 (except for LBAL_TARGET_OS_IOS, which is set whenever LBAL_TARGET_OS_IOS_SIM is set, but can also be set alone).
| |
#define | LBAL_TARGET_OS_IOS |
#define | LBAL_TARGET_OS_IOS_SIM |
#define | LBAL_TARGET_OS_X11 |
#define | LBAL_TARGET_OS_MACOS |
#define | LBAL_TARGET_OS_WINAPI |
LBAL_TARGET_RT_[EXECUTABLE_FORMAT] | |
Identiy the executable format which the compiled code is being linked in. These are most needed when the OS and/or CPU supports more than one format (e.g. Mac OS X on PPC supports CFM and Mach-O). Note that values are descriptive; if the condition is met, the value will be 1, otherwise 0.
| |
#define | LBAL_TARGET_RT_COFF |
#define | LBAL_TARGET_RT_ELF |
#define | LBAL_TARGET_RT_MACHO |
#define | LBAL_TARGET_RT_WASM |
LBAL_TARGET_RT_[ENDIANESS] | |
Identify the byte-ordering of the code being generated. Note that this is only used to determine the “native” format. We don’t call out processors that can do either; all the processors we support operate in one mode or the other for the duration of execution, which is all we care about. | |
#define | LBAL_TARGET_RT_LITTLE_ENDIAN |
#define | LBAL_TARGET_RT_BIG_ENDIAN |
LBAL_TARGET_RT_[ADDRESSING] | |
Identify the address table size of the runtime environment which the code is being generated for. This identifies whether the binary is being generated for 32-bit or 64-bit execution. | |
#define | LBAL_TARGET_RT_32_BIT |
#define | LBAL_TARGET_RT_64_BIT |
LBAL_TARGET_API | |
Differentiate between sets of core System API’s on the same processor under the same OS. Unlike LBAL_TARGET_OS and LBAL_TARGET_CPU, these tokens are not mutally exclusive. lucenaBAL attempts to auto-configure all LBAL_TARGET_API values, but will often need a LBAL_TARGET_API value predefined—e.g., in a build file—in order to disambiguate. Note that values are descriptive; if the condition is met, the value will be 1, otherwise 0.
| |
#define | LBAL_TARGET_API_COCOA |
#define | LBAL_TARGET_API_COCOA_TOUCH |
#define | LBAL_TARGET_API_POSIX |
#define | LBAL_TARGET_API_WIN32 |
#define | LBAL_TARGET_API_WIN64 |
#define | LBAL_TARGET_API_X11 |
Describes aspects of the build-time environment relevant to library clients.
These are mostly descriptors of various kinds.
#define LBAL_NAME_COMPILER |
This names the compiler used to build the code.
#define LBAL_NAME_STANDARD_LIBRARY |
This names the implementation of the C++ Standard Library used to build the code.
#define LBAL_NAME_TARGET_CPU |
At a minimum, this will name the CPU family that the code was compiled for, but it may contain much more detailed information.
#define LBAL_NAME_TARGET_OS |
This names the target OS, and may identify the minimum supported version of the target OS, as well, though is not required to do so.
#define LBAL_TARGET_API_COCOA |
Apple’s object-oriented API for macOS.
#define LBAL_TARGET_API_COCOA_TOUCH |
Apple’s object-oriented API for iOS, watchOS, and tvOS.
#define LBAL_TARGET_API_POSIX |
The standard C API used by all flavors of UNIX.
#define LBAL_TARGET_API_WIN32 |
A Microsoft’s C API for Windows.
#define LBAL_TARGET_API_WIN64 |
A Microsoft’s C API for Windows, specific to 64-bit implementations.
#define LBAL_TARGET_API_X11 |
The standard C Graphics API used by most flavors of UNIX.
#define LBAL_TARGET_COMPILER_APPLE_CLANG |
The compiler being used is the llvm/clang variant shipped with Apple’s Xcode.
More information is available from the llvm project.
#define LBAL_TARGET_COMPILER_CLANG |
The compiler being used is an llvm/clang derivative.
This probably won’t match c2/clang, but no testing has been done to see what that setup may be emulating. More information is available from the llvm project.
#define LBAL_TARGET_COMPILER_GCC |
The compiler being used is a gcc derivative.
More information is available from the gcc project.
#define LBAL_TARGET_COMPILER_MSVC |
The compiler being used is an MSVC derivative.
More information is available from Microsoft.
#define LBAL_TARGET_COMPILER_VANILLA_CLANG |
The compiler being used is pure llvm/clang.
More information is available from the llvm project.
#define LBAL_TARGET_COMPILER_VANILLA_GCC |
The compiler being used is pure gcc.
More information is available from the llvm project.
#define LBAL_TARGET_COMPILER_VANILLA_MSVC |
The compiler being used is pure MSVC.
More information is available from Microsoft.
#define LBAL_TARGET_CPU_ARM |
Generic 32-bit ARM
#define LBAL_TARGET_CPU_ARM_64 |
Generic 64-bit ARM
#define LBAL_TARGET_CPU_FAMILY_ARM |
The CPU is in the ARM chip family.
#define LBAL_TARGET_CPU_FAMILY_X86 |
The CPU is x86 instruction set-compatible, including Intel and AMD processors.
#define LBAL_TARGET_CPU_IA64 |
Generic 64-bit Itanium
#define LBAL_TARGET_CPU_X86 |
Generic 32-bit x86
#define LBAL_TARGET_CPU_X86_64 |
Generic 64-bit x86
#define LBAL_TARGET_OS_IOS |
Apple’s iOS
#define LBAL_TARGET_OS_IOS_SIM |
Apple‘s iOS running under a Simulator
#define LBAL_TARGET_OS_MACOS |
Apple’s macOS
#define LBAL_TARGET_OS_WINAPI |
Microsoft’s Windows
#define LBAL_TARGET_OS_X11 |
X.org‘s X11
#define LBAL_TARGET_RT_32_BIT |
32-bit addressing is being used.
#define LBAL_TARGET_RT_64_BIT |
64-bit addressing is being used.
#define LBAL_TARGET_RT_BIG_ENDIAN |
The PowerPC-standard Big Endian byte-ordering is being used.
#define LBAL_TARGET_RT_COFF |
A COFF derivative is being used, including COFF and PE/COFF.
#define LBAL_TARGET_RT_ELF |
The ELF executable format, currently the default for Linux and BSD, is being used.
#define LBAL_TARGET_RT_LITTLE_ENDIAN |
The Intel-standard Little Endian byte-ordering is being used.
#define LBAL_TARGET_RT_MACHO |
The Mach-O executable format, currently the default for macOS and iOS, is being used.
#define LBAL_TARGET_RT_WASM |
The Wasm byte code executable format is being used.
#define LBAL_TARGET_STANDARD_LIBRARY_APPLE_LIBCPP |
C++ Standard Library implementation is Apple’s libc++.
Information available from the llvm project.
#define LBAL_TARGET_STANDARD_LIBRARY_LIBCPP |
C++ Standard Library implementation is libc++.
Information available from the llvm project.
#define LBAL_TARGET_STANDARD_LIBRARY_LIBSTDCPP |
C++ Standard Library implementation is libstdc++.
Information available from the gcc project.
#define LBAL_TARGET_STANDARD_LIBRARY_MSVC |
C++ Standard Library implementation is Microsoft’s.
Information available from Microsoft.
#define LBAL_TARGET_VEC_AVX |
Intel AVX SIMD instruction set.
#define LBAL_TARGET_VEC_AVX2 |
Intel AVX2 SIMD instruction set.
#define LBAL_TARGET_VEC_SSE |
Intel SSE SIMD instruction set.
#define LBAL_TARGET_VEC_SSE2 |
Intel SSE2 SIMD instruction set.
#define LBAL_TARGET_VEC_SSE3 |
Intel SSE3 SIMD instruction set.
#define LBAL_TARGET_VEC_SSE41 |
Intel SSE4.1 SIMD instruction set.
#define LBAL_TARGET_VEC_SSE42 |
Intel SSE4.2 SIMD instruction set.