Build fixes and parameter passing for the Clang header generator

PiperOrigin-RevId: 338994867
Change-Id: I40f03738ae38bac4bf217c24bd935d5d3572c1f2
This commit is contained in:
Christian Blichmann 2020-10-26 01:42:17 -07:00 committed by Copybara-Service
parent 19a8e38a51
commit 609a370634
2 changed files with 3 additions and 3 deletions

View File

@ -133,7 +133,7 @@ function(add_sapi_library)
set(_sapi_embed_name "${_sapi_NAME}") set(_sapi_embed_name "${_sapi_NAME}")
endif() endif()
set(_sapi_isystem "${_sapi_NAME}.isystem}") set(_sapi_isystem "${_sapi_NAME}.isystem")
list(APPEND _sapi_generator_args list(APPEND _sapi_generator_args
"--sapi_name=${_sapi_LIBRARY_NAME}" "--sapi_name=${_sapi_LIBRARY_NAME}"
"--sapi_out=${_sapi_gen_header}" "--sapi_out=${_sapi_gen_header}"
@ -143,7 +143,6 @@ function(add_sapi_library)
"--sapi_ns=${_sapi_NAMESPACE}" "--sapi_ns=${_sapi_NAMESPACE}"
"--sapi_isystem=${_sapi_isystem}" "--sapi_isystem=${_sapi_isystem}"
) )
list(JOIN _sapi_full_inputs "," _sapi_full_inputs)
if(SAPI_ENABLE_GENERATOR) if(SAPI_ENABLE_GENERATOR)
list(APPEND _sapi_generator_command list(APPEND _sapi_generator_command
sapi_generator_tool sapi_generator_tool
@ -152,6 +151,7 @@ function(add_sapi_library)
${_sapi_full_inputs} ${_sapi_full_inputs}
) )
else() else()
list(JOIN _sapi_full_inputs "," _sapi_full_inputs)
list(APPEND _sapi_generator_command list(APPEND _sapi_generator_command
"${SAPI_PYTHON3_EXECUTABLE}" -B "${SAPI_PYTHON3_EXECUTABLE}" -B
"${SAPI_SOURCE_DIR}/sandboxed_api/tools/generator2/sapi_generator.py" "${SAPI_SOURCE_DIR}/sandboxed_api/tools/generator2/sapi_generator.py"

View File

@ -31,7 +31,7 @@ bool IsFunctionReferenceType(clang::QualType qual) {
} // namespace } // namespace
void TypeCollector::CollectRelatedTypes(clang::QualType qual) { void TypeCollector::CollectRelatedTypes(clang::QualType qual) {
if (seen_.contains(qual)) { if (seen_.count(qual) > 0) { // contains() is LLVM_VERSION_MAJOR >= 11
return; return;
} }
seen_.insert(qual); seen_.insert(qual);