구성원
- action_is_enabled
- CcToolchainInfo
- compile
- configure_features
- create_cc_toolchain_config_info
- create_compilation_context
- create_compilation_outputs
- create_compile_variables
- create_library_to_link
- create_link_variables
- create_linker_input
- create_linking_context
- create_linking_context_from_compilation_outputs
- do_not_use_tools_cpp_compiler_present
- get_environment_variables
- get_execution_requirements
- get_memory_inefficient_command_line
- get_tool_for_action
- is_enabled
- 링크
- merge_cc_infos
- merge_compilation_contexts
- merge_compilation_outputs
action_is_enabled
bool cc_common.action_is_enabled(feature_configuration, action_name)지정된 action_config가 기능 구성에서 사용 설정된 경우 true를 반환합니다.
매개변수
매개변수 | 설명 |
---|---|
feature_configuration
|
필수 쿼리할 기능 구성입니다. |
action_name
|
필수 항목 action_config의 이름입니다. |
CcToolchainInfo
Provider cc_common.CcToolchainInfo사용 중인 C++ 도구 모음에 대한 정보가 포함된 제공자를 검색하는 데 사용되는 키
compile
tuple cc_common.compile(actions, feature_configuration, cc_toolchain, srcs=[], public_hdrs=[], private_hdrs=[], includes=[], quote_includes=[], system_includes=[], framework_includes=[], defines=[], local_defines=[], include_prefix='', strip_include_prefix='', user_compile_flags=[], compilation_contexts=[], name, disallow_pic_outputs=False, disallow_nopic_outputs=False, additional_inputs=[], grep_includes=None)C++ 컴파일에 사용해야 합니다. (
CompilationContext
, CcCompilationOutputs
)의 튜플을 반환합니다.
매개변수
매개변수 | 설명 |
---|---|
actions
|
필수actions 객체입니다.
|
feature_configuration
|
feature_configuration 를쿼리해야 합니다. |
cc_toolchain
|
필수CcToolchainInfo 공급자를 사용해야 합니다.
|
srcs
|
default = [] 컴파일할 소스 파일의 목록입니다. |
public_hdrs
|
default = [] src를 컴파일하는 데 필요한 헤더 목록으로, 종속 규칙에 따라 전이적으로 포함될 수 있습니다. |
private_hdrs
|
default = [] src를 컴파일하는 데 필요하며 종속 규칙에 의해 포함되지 않아야 하는 헤더 목록입니다. |
includes
|
default = [] 꺾쇠괄호와 따옴표로 모두 참조되는 헤더 파일의 검색 경로입니다. 일반적으로 -I로 전달됩니다. 종속 항목에 전이적으로 전파됩니다. |
quote_includes
|
default = [] 따옴표로 묶인 헤더 파일의 검색 경로입니다(예: #include "foo/bar/header.h"). exec 루트 또는 절대값일 수 있습니다. 일반적으로 -iquote를 사용하여 전달됩니다. 종속 항목에 전이적으로 전파됩니다. |
system_includes
|
default = [] 꺾쇠괄호로 참조되는 헤더 파일의 검색 경로입니다(예: #include <foo/bar/header.h>). exec 루트 또는 절대값 기준일 수 있습니다. 일반적으로 -isystem과 함께 전달됩니다. 종속 항목에 전이적으로 전파됩니다. |
framework_includes
|
default = [] Apple 프레임워크의 헤더 파일의 검색 경로입니다. exec 루트 또는 절대값일 수 있습니다. 일반적으로 -F로 전달됩니다. 종속 항목에 전이적으로 전파됩니다. |
defines
|
default = [] 이 타겟을 컴파일하는 데 필요한 정의 집합입니다. 각 정의는 문자열입니다. 종속 항목에 전이적으로 전파됩니다. |
local_defines
|
default = [] 이 타겟을 컴파일하는 데 필요한 정의 집합입니다. 각 정의는 문자열입니다. 종속 항목에 전이적으로 전파되지 않습니다. |
include_prefix
|
default = '' 이 규칙의 헤더 경로에 추가할 프리픽스입니다. 이 속성을 설정하면 저장소 상대 경로 앞에 추가된 이 속성의 값에서 이 규칙의 hdrs 속성에 있는 헤더에 액세스할 수 있습니다. 스트립_포함_프리픽스 속성의 접두사는 이 접두사가 추가되기 전에 삭제됩니다. |
strip_include_prefix
|
default = '' 이 규칙의 헤더 경로에서 삭제할 프리픽스입니다. 설정된 경우 이 규칙의 hdrs 속성에 있는 헤더는 이 접두어가 잘린 경로에서 액세스할 수 있습니다. 상대 경로인 경우 패키지 기준 경로로 사용됩니다. 절대 경로인 경우 저장소 기준 경로로 간주됩니다. include_prefix 속성의 접두사는 이 접두사가 제거된 후에 추가됩니다. |
user_compile_flags
|
default = [] 컴파일 옵션의 추가 목록입니다. |
compilation_contexts
|
default = [] 컴파일에 사용되는 종속 항목의 헤더입니다. |
name
|
필수 이 메서드에서 만든 작업의 출력 아티팩트의 이름을 지정하는 데 사용됩니다. `main_output` 인수도 참고하세요. |
disallow_pic_outputs
|
default = False PIC 출력 생성 여부입니다. |
disallow_nopic_outputs
|
default = False NOPIC 출력 생성 여부입니다. |
additional_inputs
|
default = [] src를 컴파일하는 데 필요한 추가 파일 목록 |
grep_includes
|
File; or None , 기본값 = None |
configure_features
FeatureConfiguration cc_common.configure_features(ctx=None, cc_toolchain, language=None, requested_features=[], unsupported_features=[])feature_configuration 인스턴스를 만듭니다. cpp 구성 프래그먼트가 필요합니다.
매개변수
매개변수 | 설명 |
---|---|
ctx
|
ctx; or None ;
default = None규칙 컨텍스트입니다. |
cc_toolchain
|
필수 cc_toolchain의 하위 클래스입니다. |
language
|
string; or None ;
default = None구성할 언어: c++ 또는 objc (기본 c++) |
requested_features
|
default = [] 사용 설정할 기능 목록입니다. |
unsupported_features
|
default = [] 현재 규칙에서 지원하지 않는 기능 목록입니다. |
create_cc_toolchain_config_info
CcToolchainConfigInfo cc_common.create_cc_toolchain_config_info(ctx, features=[], action_configs=[], artifact_name_patterns=[], cxx_builtin_include_directories=[], toolchain_identifier, host_system_name=None, target_system_name, target_cpu, target_libc, compiler, abi_version=None, abi_libc_version=None, tool_paths=[], make_variables=[], builtin_sysroot=None, cc_target_os=None)
CcToolchainConfigInfo
제공자를 만듭니다.
매개변수
매개변수 | 설명 |
---|---|
ctx
|
필수 규칙 컨텍스트입니다. |
features
|
default = [] 기능 목록입니다. |
action_configs
|
default = [] action_configs의 목록입니다. |
artifact_name_patterns
|
default = [] artifact_name_patterns의 목록입니다. |
cxx_builtin_include_directories
|
기본값 = [] C++ 컴파일을 위해 내장된 include 디렉터리. 이러한 경로는 컴파일러에서 사용하는 정확한 경로여야 하며 일반적으로 exec 루트를 기준으로 합니다. 컴파일러가 사용하는 경로는 'gcc -E -xc++ - -v'로 확인할 수 있습니다. 현재는 C 컴파일에도 C++ 경로를 사용하며 이는 C++ 및 C 헤더 파일 간에 이름 충돌이 없는 한 안전합니다. 상대 경로는 구성 파일 디렉터리를 기준으로 확인됩니다. 컴파일러가 --sysroot를 지원하는 경우 이러한 경로는 include 경로가 아닌 %sysroot% 를 사용하고 sysroot 속성을 지정하여 올바른 대체 경로를 찾는 데 필요한 정보를 제공해야 합니다. |
toolchain_identifier
|
필수 크로스툴 출시 내 도구 모음의 고유 식별자입니다. 경로의 디렉터리 이름으로 이 이름을 사용할 수 있어야 합니다. 다음 정규식과 일치해야 합니다. [a-zA-Z_][\.\- \w]* |
host_system_name
|
string; or None ;
default = None무시됩니다. |
target_system_name
|
필수 GNU 시스템 이름입니다. |
target_cpu
|
필수 타겟 아키텍처 문자열입니다. |
target_libc
|
필수 libc 버전 문자열 (예: 'glibc-2.2.2') |
compiler
|
필수 컴파일러 버전 문자열입니다 (예: 'gcc-4.1.1'). |
abi_version
|
string; or None ;
default = None사용 중인 abi로, gcc 버전입니다. E.g.: 'gcc-3.4' |
abi_libc_version
|
string; or None ;
default = None사용 중인 abi에서 사용하는 glibc 버전입니다. |
tool_paths
|
default = [] tool_paths의 목록입니다. |
make_variables
|
default = [] make_variables의 목록입니다. |
builtin_sysroot
|
string; or None ;
default = None내장된 sysroot입니다. 이 속성이 없으면 Bazel은 다른 sysroot를 사용하는 것을 허용하지 않습니다(즉, --grte_top 옵션을 통해). |
cc_target_os
|
string; or None ;
default = None내부 전용이며 사용하지 않습니다. |
create_compilation_context
CompilationContext cc_common.create_compilation_context(headers=unbound, system_includes=unbound, includes=unbound, quote_includes=unbound, framework_includes=unbound, defines=unbound, local_defines=unbound)
CompilationContext
를 만듭니다.
매개변수
매개변수 | 설명 |
---|---|
headers
|
default = unbound 이 타겟을 컴파일하는 데 필요한 헤더 집합 |
system_includes
|
default = unbound 꺾쇠괄호로 참조되는 헤더 파일의 검색 경로 세트(예: #include <foo/bar/header.h>)입니다. exec 루트 또는 절대값에 상대적일 수 있습니다. 일반적으로 -isystem과 함께 전달됩니다. |
includes
|
기본값 = unbound 꺾쇠괄호와 따옴표로 모두 참조되는 헤더 파일의 검색 경로 집합. 일반적으로 -I로 전달됩니다. |
quote_includes
|
default = unbound 따옴표로 묶인 헤더 파일의 검색 경로 집합(예: #include "foo/bar/header.h")입니다. exec 루트 또는 절대값일 수 있습니다. 일반적으로 -i따옴표로 전달됩니다. |
framework_includes
|
default = unbound 헤더 파일의 프레임워크 검색 경로 집합 (Apple 플랫폼만 해당) |
defines
|
default = unbound 이 타겟을 컴파일하는 데 필요한 정의 집합입니다. 각 정의는 문자열입니다. 종속 항목에 전이적으로 전파됩니다. |
local_defines
|
default = unbound 이 타겟을 컴파일하는 데 필요한 정의 집합입니다. 각 정의는 문자열입니다. 종속 항목에 전이적으로 전파되지 않습니다. |
create_compilation_outputs
CcCompilationOutputs cc_common.create_compilation_outputs(objects=None, pic_objects=None)컴파일 출력 객체를 만듭니다.
매개변수
매개변수 | 설명 |
---|---|
objects
|
depset; or None ;
default = None객체 파일 목록입니다. |
pic_objects
|
depset; or None ; default = None사진 객체 파일 목록입니다. |
create_compile_variables
Variables cc_common.create_compile_variables(cc_toolchain, feature_configuration, source_file=None, output_file=None, user_compile_flags=None, include_directories=None, quote_include_directories=None, system_include_directories=None, framework_include_directories=None, preprocessor_defines=None, thinlto_index=None, thinlto_input_bitcode_file=None, thinlto_output_object_file=None, use_pic=False, add_legacy_cxx_options=False, variables_extension=unbound)컴파일 작업에 사용되는 변수를 반환합니다.
매개변수
매개변수 | 설명 |
---|---|
cc_toolchain
|
필수 cc_toolchain이 필요합니다. |
feature_configuration
|
필수 쿼리할 기능 구성입니다. |
source_file
|
default = None 컴파일을 위한 선택적 소스 파일입니다. cc_common.get_memory_inefficiency_command_line에서 생성된 명령줄 끝에 source_file을 추가하는 것보다 여기서 source_file을 전달하는 것이 좋습니다. 컴파일러 플래그를 적절하게 지정하고 배치하는 것은 도구 모음 작성자의 몫이기 때문입니다. |
output_file
|
default = None 컴파일의 선택적 출력 파일입니다. 컴파일러 플래그를 적절하게 지정하고 배치하는 것은 도구 모음 작성자의 몫이므로, cc_common.get_memory_inefficiency_command_line에서 생성된 명령줄 끝에 output_file을 추가하는 것보다 여기서 output_file을 전달하는 것이 좋습니다. |
user_compile_flags
|
sequence of strings; or None ;
default = None추가 컴파일 플래그 (copt)의 목록입니다. |
include_directories
|
depset; or None ;
default = Noneinclude 디렉터리의 하위 집합입니다. |
quote_include_directories
|
depset; or None ;
default = None따옴표 포함 디렉터리의 디코딩입니다. |
system_include_directories
|
depset; or None ;
default = None시스템 포함 디렉터리의 하위 집합입니다. |
framework_include_directories
|
depset; or None ;
default = None프레임워크 포함 디렉터리의 종속 항목입니다. |
preprocessor_defines
|
depset; or None ;
default = None전처리기 정의의 종속 항목입니다. |
thinlto_index
|
string; or None , default = NoneLTO 색인 파일 경로입니다. |
thinlto_input_bitcode_file
|
string; or None ;
default = NoneLTO 백엔드에 입력되는 비트코드 파일입니다. |
thinlto_output_object_file
|
string; or None ;
default = NoneLTO 백엔드에서 출력되는 객체 파일입니다. |
use_pic
|
default = False true인 경우 컴파일에서 위치 독립적 코드를 생성합니다. |
add_legacy_cxx_options
|
default = False 사용되지 않습니다. |
variables_extension
|
dict ;
default = unbound컴파일 작업에 사용되는 추가 변수 사전입니다. |
create_library_to_link
LibraryToLink cc_common.create_library_to_link(actions, feature_configuration=None, cc_toolchain=None, static_library=None, pic_static_library=None, dynamic_library=None, interface_library=None, pic_objects=unbound, objects=unbound, alwayslink=False, dynamic_library_symlink_path='', interface_library_symlink_path='')
LibraryToLink
를 만듭니다.
매개변수
매개변수 | 설명 |
---|---|
actions
|
필수actions 객체입니다.
|
feature_configuration
|
default = Nonefeature_configuration 를 쿼리합니다.
|
cc_toolchain
|
default = None 사용할 CcToolchainInfo 제공업체입니다.
|
static_library
|
File; or None ;
default = None연결할 정적 라이브러리의 File .
|
pic_static_library
|
File; or None ;
default = None연결할 사진 정적 라이브러리의 File .
|
dynamic_library
|
File; or None ;
default = None연결할 동적 라이브러리의 File 입니다. 항상 런타임에 사용되며 interface_library 가 전달되지 않을 경우 연결에 사용됩니다.
|
interface_library
|
File; or None ;
default = None연결할 인터페이스 라이브러리의 File 입니다.
|
pic_objects
|
sequence of Files , 기본값 = unbound실험용, 사용 금지 |
objects
|
sequence of Files , 기본값 = unbound실험용, 사용 금지 |
alwayslink
|
default = False --whole_Archive 블록에 정적 라이브러리/객체를 연결할지 여부입니다. |
dynamic_library_symlink_path
|
string ;
default = ''solib 디렉터리에서 동적 라이브러리 링크의 기본 경로를 재정의합니다. 기본값을 사용하려면 문자열을 비워 둡니다. |
interface_library_symlink_path
|
default = '' solib 디렉터리에서 인터페이스 라이브러리 링크의 기본 경로를 재정의합니다. 기본값을 사용하려면 문자열을 비워 둡니다. |
create_link_variables
Variables cc_common.create_link_variables(cc_toolchain, feature_configuration, library_search_directories=None, runtime_library_search_directories=None, user_link_flags=None, output_file=None, param_file=None, def_file=None, is_using_linker=True, is_linking_dynamic_library=False, must_keep_debug=True, use_test_only_flags=False, is_static_linking_mode=True)연결 작업에 사용되는 링크 변수를 반환합니다.
매개변수
매개변수 | 설명 |
---|---|
cc_toolchain
|
필수 cc_toolchain이 필요합니다. |
feature_configuration
|
필수 쿼리할 기능 구성입니다. |
library_search_directories
|
None; or depset ;
default = None링커가 링크 시간에 라이브러리를 찾는 디렉터리의 하위 집합입니다. |
runtime_library_search_directories
|
None; or depset ;
default = None로더가 런타임에 라이브러리를 찾는 디렉터리의 하위 집합입니다. |
user_link_flags
|
None; or sequence ;
default = None추가 링크 플래그 (linkopt)의 목록입니다. |
output_file
|
default = None 선택사항인 출력 파일 경로입니다. |
param_file
|
default = None 선택적 매개변수 파일 경로입니다. |
def_file
|
default = None 선택사항인 .def 파일 경로입니다. |
is_using_linker
|
default = True 링커 사용 시 true, 보관 파일 사용 시 False입니다. 호출자는 사용된 작업 이름과 동기화 상태를 유지해야 합니다 (실행 파일 또는 동적 라이브러리 연결의 경우 is_using_linker = True, 정적 라이브러리 보관처리의 경우 is_using_linker = False). |
is_linking_dynamic_library
|
default = False 동적 라이브러리 생성 시 true, 실행 가능 또는 정적 라이브러리 생성 시 false입니다. 호출자는 사용된 작업 이름과 이를 동기화해야 합니다. 이 필드는 b/65151735가 수정되면 삭제됩니다. |
must_keep_debug
|
default = True True로 설정하면 bazel이 'strip_debug_symbols' 변수를 노출합니다. 이 변수는 일반적으로 링커를 사용하여 출력 파일에서 디버그 기호를 제거하는 데 사용됩니다. |
use_test_only_flags
|
default = False true로 설정하면 'is_cc_test' 변수가 설정됩니다. |
is_static_linking_mode
|
default = True 사용되지 않습니다. |
create_linker_input
LinkerInput cc_common.create_linker_input(owner, libraries=None, user_link_flags=None, additional_inputs=None)
LinkerInput
를 만듭니다.
매개변수
매개변수 | 설명 |
---|---|
owner
|
필수 이 입력에 사용된 모든 파일을 생성한 대상의 라벨입니다. |
libraries
|
None; or depset ;
default = NoneLibraryToLink 목록입니다.
|
user_link_flags
|
None; or depset of strings; or sequence of strings ;
default = None사용자 링크 플래그는 문자열로 전달됩니다. [String], [[String]] 또는 depset(String)을 사용할 수 있습니다. 후자는 호환성 목적으로만 유지되고 depset이 평면화되므로 권장되지 않습니다. 평면화되지 않은 depsets()를 통해 user_link_flags를 전파하려면 끝까지 평탄화되지 않도록 LinkerInput에 래핑합니다. |
additional_inputs
|
None; or depset ;
default = None연결 작업에 대한 추가 입력(예: 연결 스크립트) |
create_linking_context
LinkingContext cc_common.create_linking_context(linker_inputs=None, libraries_to_link=None, user_link_flags=None, additional_inputs=None)
LinkingContext
를 만듭니다.
매개변수
매개변수 | 설명 |
---|---|
linker_inputs
|
None; or depset ;
default = NoneLinkerInput 의 하위 집합입니다.
|
libraries_to_link
|
None; or sequence , default = None지원 중단됨. 이 매개변수는 지원 중단되었으며 곧 삭제됩니다. 의존하지 마세요. --+incompatible_require_linker_input_cc_api 를 통해 사용 중지됩니다. 이 플래그를 사용하여 코드가 임박한 삭제와 호환되는지 확인합니다. LibraryToLink 의 목록입니다.
|
user_link_flags
|
None; or sequence , default = None지원 중단됨. 이 매개변수는 지원 중단되었으며 곧 삭제됩니다. 의존하지 마세요. --+incompatible_require_linker_input_cc_api 를 통해 사용 중지됩니다. 이 플래그를 사용하여 코드가 임박한 삭제와 호환되는지 확인합니다. 문자열로 전달된 사용자 링크 플래그 목록입니다. |
additional_inputs
|
None; or sequence , default = None지원 중단됨. 이 매개변수는 지원 중단되었으며 곧 삭제됩니다. 의존하지 마세요. --+incompatible_require_linker_input_cc_api 를 통해 사용 중지됩니다. 이 플래그를 사용하여 코드가 임박한 삭제와 호환되는지 확인합니다. 연결 작업에 대한 추가 입력(예: 연결 스크립트) |
create_linking_context_from_compilation_outputs
tuple cc_common.create_linking_context_from_compilation_outputs(actions, feature_configuration, cc_toolchain, compilation_outputs, user_link_flags=[], linking_contexts=[], name, language='c++', alwayslink=False, additional_inputs=[], disallow_static_libraries=False, disallow_dynamic_library=False, grep_includes=None)실행 가능 라이브러리나 동적 라이브러리를 만들기 위해 전이 연결을 수행하는 최상위 규칙에 의해 나중에 연결될 수 있도록 다운스트림 정보를 전파할 수 있는 라이브러리 규칙을 만드는 데 사용해야 합니다. (
CcLinkingContext
, CcLinkingOutputs
)의 튜플을 반환합니다.
매개변수
매개변수 | 설명 |
---|---|
actions
|
필수actions 객체입니다.
|
feature_configuration
|
feature_configuration 를쿼리해야 합니다. |
cc_toolchain
|
필수CcToolchainInfo 공급자를 사용해야 합니다.
|
compilation_outputs
|
필수 링크할 객체 파일이 포함된 컴파일 출력입니다. |
user_link_flags
|
default = [] 연결 옵션의 추가 목록입니다. |
linking_contexts
|
default = [] 종속 항목의 라이브러리입니다. 이러한 라이브러리는 바이너리 또는 라이브러리인 link() 호출의 출력 아티팩트에 링크됩니다. |
name
|
필수 이 메서드에서 만든 작업의 출력 아티팩트의 이름을 지정하는 데 사용됩니다. |
language
|
default = 'c++' 현재는 C++만 지원됩니다. 이 매개변수를 사용하지 마세요. |
alwayslink
|
default = False 이 라이브러리를 항상 연결해야 하는지 여부입니다. |
additional_inputs
|
default = [] 연결 작업에 대한 추가 입력 값(예: 스크립트 연결) |
disallow_static_libraries
|
default = False 정적 라이브러리의 생성 여부입니다. |
disallow_dynamic_library
|
default = False 동적 라이브러리의 생성 여부입니다. |
grep_includes
|
File; or None , 기본값 = None |
do_not_use_tools_cpp_compiler_present
None cc_common.do_not_use_tools_cpp_compiler_present이 필드는 사용하지 마세요. 이 필드의 유일한 목적은 config_setting.values{'compiler')에서 config_settings.flag_values{'@bazel_tools//tools/cpp:compiler'}로 이전하는 데 도움을 주는 것입니다.
get_environment_variables
dict cc_common.get_environment_variables(feature_configuration, action_name, variables)특정 작업에 설정할 환경 변수를 반환합니다.
매개변수
매개변수 | 설명 |
---|---|
feature_configuration
|
필수 쿼리할 기능 구성입니다. |
action_name
|
필수 작업의 이름입니다. @bazel_tools//tools/build_defs/cc:action_names.bzl의 이름 중 하나여야 합니다 (https://github.com/bazelbuild/bazel/blob/master/tools/build_defs/cc/action_names.bzl). |
variables
|
필수 템플릿 확장에 사용할 빌드 변수입니다. |
get_execution_requirements
sequence cc_common.get_execution_requirements(feature_configuration, action_name)지정된 작업의 실행 요구사항을 반환합니다.
매개변수
매개변수 | 설명 |
---|---|
feature_configuration
|
필수 쿼리할 기능 구성입니다. |
action_name
|
필수 작업의 이름입니다. @bazel_tools//tools/build_defs/cc:action_names.bzl의 이름 중 하나여야 합니다 (https://github.com/bazelbuild/bazel/blob/master/tools/build_defs/cc/action_names.bzl). |
get_memory_inefficient_command_line
sequence cc_common.get_memory_inefficient_command_line(feature_configuration, action_name, variables)확장을 위해 지정된 변수를 사용하여 지정된 작업에 대해 평면화된 명령줄 플래그를 반환합니다. 중첩된 집합을 평면화합니다. 이상적으로는 사용해서는 안 되며, 적어도 분석보다 오래 사용해서는 안 됩니다. Args를 반환하는 메모리 효율적인 함수 작업이 진행 중입니다.
매개변수
매개변수 | 설명 |
---|---|
feature_configuration
|
필수 쿼리할 기능 구성입니다. |
action_name
|
필수 작업의 이름입니다. @bazel_tools//tools/build_defs/cc:action_names.bzl의 이름 중 하나여야 합니다 (https://github.com/bazelbuild/bazel/blob/master/tools/build_defs/cc/action_names.bzl). |
variables
|
필수 템플릿 확장에 사용할 변수를 빌드합니다. |
get_tool_for_action
string cc_common.get_tool_for_action(feature_configuration, action_name)지정된 작업의 도구 경로를 반환합니다.
매개변수
매개변수 | 설명 |
---|---|
feature_configuration
|
필수 쿼리할 기능 구성입니다. |
action_name
|
필수 작업의 이름입니다. @bazel_tools//tools/build_defs/cc:action_names.bzl의 이름 중 하나여야 합니다 (https://github.com/bazelbuild/bazel/blob/master/tools/build_defs/cc/action_names.bzl). |
is_enabled
bool cc_common.is_enabled(feature_configuration, feature_name)지정된 기능이 기능 구성에서 사용 설정된 경우 true를 반환합니다.
매개변수
매개변수 | 설명 |
---|---|
feature_configuration
|
필수 쿼리할 기능 구성입니다. |
feature_name
|
필수 기능의 이름입니다. |
링크
CcLinkingOutputs cc_common.link(actions, feature_configuration, cc_toolchain, compilation_outputs=None, user_link_flags=[], linking_contexts=[], name, language='c++', output_type='executable', link_deps_statically=True, stamp=0, additional_inputs=[], grep_includes=None, additional_outputs=unbound)C++ 전이 연결에 사용해야 합니다.
매개변수
매개변수 | 설명 |
---|---|
actions
|
필수actions 객체입니다.
|
feature_configuration
|
feature_configuration 를쿼리해야 합니다. |
cc_toolchain
|
필수CcToolchainInfo 공급자를 사용해야 합니다.
|
compilation_outputs
|
CcCompilationOutputs; or None ; default = None연결할 객체 파일이 포함된 컴파일 출력 |
user_link_flags
|
default = [] 링커 옵션의 추가 목록입니다. |
linking_contexts
|
default = [] 이 규칙에서 생성된 연결 컨텍스트에 연결할 종속 항목의 컨텍스트를 연결합니다. |
name
|
필수 이 메서드에서 만든 작업의 출력 아티팩트의 이름을 지정하는 데 사용됩니다. |
language
|
default = 'c++' 현재는 C++만 지원됩니다. 이 매개변수를 사용하지 마세요. |
output_type
|
default = 'executable' 'executable' 또는 'dynamic_library'일 수 있습니다. |
link_deps_statically
|
default = True 종속 항목을 정적으로 연결하려면 true이고 동적으로 False입니다. |
stamp
|
default = 0 output_type이 'executable'인 경우 연결된 실행 파일에 빌드 정보를 포함할지 여부입니다. 1인 경우 빌드 정보가 항상 포함됩니다. 0인 경우 (기본 빌드 정보가 항상 제외됩니다. -1인 경우 --[no]stamp 플래그로 재정의될 수 있는 기본 동작을 사용합니다. 테스트 규칙의 실행 가능한 출력을 생성할 때는 이 값을 설정하지 않거나 0으로 설정해야 합니다. |
additional_inputs
|
sequence; or depset ;
default = []연결 작업에 대한 추가 입력(예: 스크립트 연결) |
grep_includes
|
File; or None , 기본값 = None |
additional_outputs
|
sequence ;
default = unbound링크 작업에 대한 추가 출력(예: 지도 파일) |
merge_cc_infos
CcInfo cc_common.merge_cc_infos(direct_cc_infos=[], cc_infos=[])여러
CcInfo
를 하나로 병합합니다.
매개변수
매개변수 | 설명 |
---|---|
direct_cc_infos
|
default = [] 병합할 CcInfo 목록입니다. 이 목록의 헤더는 반환된 제공자의 직접 필드를 통해 내보내집니다.
|
cc_infos
|
default = [] 병합할 CcInfo 목록입니다. 이 목록의 헤더는 반환된 제공자의 직접 필드에 의해 내보내지지 않습니다.
|
merge_compilation_contexts
CompilationContext cc_common.merge_compilation_contexts(compilation_contexts=[])여러
CompilationContexts
를 하나로 병합합니다.
매개변수
매개변수 | 설명 |
---|---|
compilation_contexts
|
default = [] 병합할 CompilationContexts 목록입니다. 각 컨텍스트의 헤더는 반환된 제공자의 직접 필드에 의해 내보내집니다.
|
merge_compilation_outputs
CcCompilationOutputs cc_common.merge_compilation_outputs(compilation_outputs=[])컴파일 출력을 병합합니다.
매개변수
매개변수 | 설명 |
---|---|
compilation_outputs
|
기본값 = [] |