llvm-project/libc
Tue Ly 800051487f [libc] Implement FLAGS option for generating all combinations for targets.
Add FLAGS option for add_header_library, add_object_library,
add_entrypoint_object, and add_libc_unittest.

In general, a flag is a string provided for supported functions under the
multi-valued option `FLAGS`.  It should be one of the following forms:
  FLAG_NAME
  FLAG_NAME__NO
  FLAG_NAME__ONLY
A target will inherit all the flags of its upstream dependency.

When we create a target `TARGET_NAME` with a flag using (add_header_library,
add_object_library, ...), its behavior will depend on the flag form as follow:
- FLAG_NAME: The following 2 targets will be generated:
    `TARGET_NAME` that has `FLAG_NAME` in its `FLAGS` property.
    `TARGET_NAME.__NO_FLAG_NAME` that depends on `DEP.__NO_FLAG_NAME` if
       `TARGET_NAME` depends on `DEP` and `DEP` has `FLAG_NAME` in its `FLAGS`
       property.
- FLAG_NAME__ONLY: Only generate 1 target `TARGET_NAME` that has `FLAG_NAME`
    in its `FLAGS` property.
- FLAG_NAME__NO: Only generate 1 target `TARGET_NAME.__NO_FLAG_NAME` that
    depends on `DEP.__NO_FLAG_NAME` if `DEP` is in its DEPENDS list and `DEP`
    has `FLAG_NAME` in its `FLAGS` property.

To show all the targets generated, pass SHOW_INTERMEDIATE_OBJECTS=ON to cmake.
To show all the targets' dependency and flags, pass
`SHOW_INTERMEDIATE_OBJECTS=DEPS` to cmake.

To completely disable a flag FLAG_NAME expansion, set the variable
`SKIP_FLAG_EXPANSION_FLAG_NAME=TRUE`.

Reviewed By: michaelrj, sivachandra

Differential Revision: https://reviews.llvm.org/D125174
2022-06-01 00:54:07 -04:00
..
AOR_v20.02 Harmonize Python shebang 2020-07-16 21:53:45 +02:00
benchmarks [NFC][libc] Disable benchmarks when the LLVM benchmark target is not available 2022-03-29 08:45:53 +00:00
cmake/modules [libc] Implement FLAGS option for generating all combinations for targets. 2022-06-01 00:54:07 -04:00
config [libc] add fprintf and file_writer 2022-05-31 13:59:19 -07:00
docs [libc][docs] Use same formatting for headers in source_layout 2022-05-23 21:47:22 +00:00
fuzzing [libc][NFC] split standalone_cpp into single headers 2022-03-08 11:56:08 -08:00
include [libc] Add the pthread_mutex_t type. 2022-05-24 22:48:14 +00:00
lib [libc] add malloc funcs as external entrypoints 2021-10-27 10:21:01 -07:00
loader [libc] Use real objects and archives in integration tests. 2022-03-24 07:02:33 +00:00
spec [libc] Add global stdout and stderr objects. 2022-05-27 05:43:49 +00:00
src [libc] add fprintf and file_writer 2022-05-31 13:59:19 -07:00
test [libc] Implement FLAGS option for generating all combinations for targets. 2022-06-01 00:54:07 -04:00
utils [libc] Add global stdout and stderr objects. 2022-05-27 05:43:49 +00:00
.clang-tidy [libc] Add a naming rule for global constants. 2022-01-19 22:11:16 +00:00
.gitignore [libc][Obvious] Add build folder to .gitignore. 2022-03-04 13:16:55 -05:00
CMakeLists.txt [libc] Implement FLAGS option for generating all combinations for targets. 2022-06-01 00:54:07 -04:00
LICENSE.TXT Rename top-level LICENSE.txt files to LICENSE.TXT 2021-03-10 21:26:24 -08:00
README.txt

README.txt

LLVM libc
=========

This directory and its subdirectories contain source code for llvm-libc,
a retargetable implementation of the C standard library.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.