blob: e568610ea4ad0d5a07403f958e4e2bf8bea0925e [file] [edit]
# Copyright 2020 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Sometimes the toolchain file gets included without these definitions;
# in that case, we can just ignore the invocation.
if((DEFINED FUCHSIA_ROOT) AND (DEFINED FUCHSIA_COMPILER_TARGET) AND (DEFINED FUCHSIA_SYSTEM_PROCESSOR) AND (DEFINED FUCHSIA_SYSROOT))
include(${FUCHSIA_ROOT}/build/cmake/ToolchainCommon.cmake)
setup_toolchain_variables(
FUCHSIA_SOURCE_DIR "${FUCHSIA_ROOT}"
CLANG_COMPILER_TARGET "${FUCHSIA_COMPILER_TARGET}"
SYSROOT "${FUCHSIA_SYSROOT}"
TARGET_SYSTEM_NAME "Fuchsia"
TARGET_SYSTEM_PROCESSOR "${FUCHSIA_SYSTEM_PROCESSOR}"
TARGET_SYSTEM_VERSION "1.0")
# TODO(fxbug.dev/535971754): Remove this after upstreaming fix.
add_compile_definitions(_LIBCPP_KEEP_TRANSITIVE_INCLUDES_LLVM23)
endif()