代码拉取完成,页面将自动刷新
同步操作将从 方舟编译器孵化器/clang2mpl 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#
# Copyright (c) 2021 Futurewei Technologies, Inc.
#
# clang2mpl is licensed under Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan
# PSL v2. You may obtain a copy of Mulan PSL v2 at:
#
# http://license.coscl.org.cn/MulanPSL2
#
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY
# KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
# NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the
# Mulan PSL v2 for more details.
#
cmake_minimum_required(VERSION 3.10)
project(clang2mpl)
set( LLVM_LINK_COMPONENTS
${LLVM_TARGETS_TO_BUILD}
Option
Support
)
find_package(OpenSSL REQUIRED)
find_package(Threads)
include_directories( $ENV{MAPLE_ROOT}/src/mapleall/maple_ir/include
$ENV{MAPLE_ROOT}/src/mapleall/maple_util/include
$ENV{MAPLE_ROOT}/src/mapleall/maple_ipa/include
$ENV{MAPLE_ROOT}/src/mapleall/maple_ipa/include/old
$ENV{MAPLE_ROOT}/src/mapleall/maple_phase/include
$ENV{MAPLE_ROOT}/src/mapleall/maple_driver/include
$ENV{MAPLE_ROOT}/src/mapleall/maple_me/include
$ENV{MAPLE_ROOT}/src/mapleall/mpl2mpl/include
$ENV{MAPLE_ROOT}/src/mapleall/mempool/include
$ENV{MAPLE_ROOT}/third_party/bounds_checking_function/include
$ENV{MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/include
${OPENSSL_INCLUDE_DIR}
)
link_directories( ${CMAKE_INSTALL_PREFIX}/lib/64
$ENV{MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/lib
)
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_C_COMPILER $ENV{MAPLE_ROOT}/tools/bin/clang)
set(CMAKE_CXX_COMPILER $ENV{MAPLE_ROOT}/tools/bin/clang++)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -std=c++17")
add_executable(clang2mpl
Clang2Maple.cpp
Clang2MapleResult.cpp
Clang2MapleVisitor.cpp
)
target_compile_definitions(clang2mpl
PRIVATE DYNAMICLANG
PRIVATE MAPLE_ROOT=\"$ENV{MAPLE_ROOT}\"
PRIVATE INSTALL_DIR=\"${CMAKE_INSTALL_PREFIX}\")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(clang2mpl PRIVATE DEBUG)
endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
target_link_libraries(clang2mpl
PRIVATE
$ENV{MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/libclangTooling.a
$ENV{MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/libclang-cpp.so
$ENV{MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/libclangAST.a
$ENV{MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/libclangBasic.a
$ENV{MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/libclangDriver.a
$ENV{MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/libclangFrontend.a
$ENV{MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/libclangRewriteFrontend.a
$ENV{MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/libclangSerialization.a
$ENV{MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/libclangStaticAnalyzerFrontend.a
$ENV{MAPLE_ROOT}/tools/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/libclangToolingSyntax.a
-Wl,--start-group
${CMAKE_INSTALL_PREFIX}/lib/64/libmplir.a
${CMAKE_INSTALL_PREFIX}/lib/64/libdriver_option.a
${CMAKE_INSTALL_PREFIX}/lib/64/libmaple_driver.a
${CMAKE_INSTALL_PREFIX}/lib/64/libmempool.a
${CMAKE_INSTALL_PREFIX}/lib/64/libmpl2mpl.a
${CMAKE_INSTALL_PREFIX}/lib/64/libmplutil.a
${CMAKE_INSTALL_PREFIX}/lib/64/libcommandline.a
-Wl,--end-group
${CMAKE_INSTALL_PREFIX}/lib/64/libHWSecureC.a
${CMAKE_THREAD_LIBS_INIT}
)
install(
TARGETS clang2mpl
RUNTIME DESTINATION bin)
set(header_install_dir lib/clang2mpl/include)
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/sys/include/
DESTINATION ${header_install_dir})
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。