Skip to content

Commit

Permalink
remove clang dep
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Nov 2, 2023
1 parent 8bf4969 commit d2193e4
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 28 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/buildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,6 @@ jobs:
-DMLIR_DIR=../llvm/install/lib/cmake/mlir \
-DLLVM_DIR=../llvm/install/lib/cmake/llvm \
-DCMAKE_LINKER=lld \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
-DLLVM_EXTERNAL_LIT=`pwd`/../llvm/build/bin/llvm-lit \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
ninja
Expand All @@ -207,9 +204,6 @@ jobs:
-DMLIR_DIR=../llvm/install/lib/cmake/mlir \
-DLLVM_DIR=../llvm/install/lib/cmake/llvm \
-DCMAKE_LINKER=lld \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
-DLLVM_EXTERNAL_LIT=`pwd`/../llvm/build/bin/llvm-lit
make -j$(nproc)
make check-aie
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/generateDocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ jobs:
-DMLIR_DIR=../llvm/install/lib/cmake/mlir \
-DLLVM_DIR=../llvm/install/lib/cmake/llvm \
-DCMAKE_LINKER=lld \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DAIE_INCLUDE_DOCS=ON \
-DLLVM_EXTERNAL_LIT=`pwd`/../llvm/build/bin/llvm-lit
make docs
Expand Down
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ set(AIE_LINKER
"XCHESSCC"
CACHE STRING "Backend linker selection")
set(HOST_COMPILER
"CLANG"
""
CACHE STRING "Host program compiler selection")
set(PEANO_INSTALL_DIR
"<unset>"
Expand Down Expand Up @@ -134,6 +134,15 @@ include_directories(${PROJECT_BINARY_DIR}/include)
include_directories(${Boost_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})

# Silence a false positive GCC -Wunused-but-set-parameter warning in constexpr
# cases, by marking SelectedCase as used. See
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85827 for details. The issue is
# fixed in GCC 10.
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10.0")
check_cxx_compiler_flag("-Wno-unused-but-set-parameter" CXX_SUPPORTS_WNO_UNUSED_BUT_SET_PARAMETER)
append_if(CXX_SUPPORTS_WNO_UNUSED_BUT_SET_PARAMETER "-Wno-unused-but-set-parameter" CMAKE_CXX_FLAGS)
endif()

# Make sure we generate the headers
add_custom_target(aie-headers)
set_target_properties(aie-headers PROPERTIES FOLDER "Misc")
Expand Down
12 changes: 0 additions & 12 deletions cmake/toolchainFiles/toolchain_x86_64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,5 @@
# Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved.
# SPDX-License-Identifier: MIT

# specify the compiler
set(CLANG_VER 12)
set(CMAKE_C_COMPILER clang-${CLANG_VER})
set(CMAKE_CXX_COMPILER clang++-${CLANG_VER})
set(CMAKE_ASM_COMPILER clang-${CLANG_VER})
set(CMAKE_STRIP llvm-strip-${CLANG_VER})
set(CLANG_LLD lld-${CLANG_VER} CACHE STRING "" FORCE)

# Make it a debug runtime build
#set(CMAKE_BUILD_TYPE Debug CACHE STRING "build type" FORCE)
#set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "" FORCE)

# the default for x86 is to build a PCIe runtime
set(BUILD_AIR_PCIE ON CACHE BOOL "" FORCE)
1 change: 0 additions & 1 deletion docs/Building.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## Prerequisites

```
clang 10.0.0+
lld
cmake 3.20.6
ninja 1.8.2
Expand Down
2 changes: 0 additions & 2 deletions utils/build-llvm-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ set -o pipefail
set -e
cmake ../llvm \
-GNinja \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DPython3_FIND_VIRTUALENV=ONLY \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DCLANG_LINK_CLANG_DYLIB=ON \
Expand Down
2 changes: 0 additions & 2 deletions utils/build-llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ cmake ../llvm \
-DLLVM_ENABLE_OCAMLDOC=OFF \
-DLLVM_ENABLE_BINDINGS=OFF \
-DLLVM_INSTALL_UTILS=ON \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DLLVM_CCACHE_BUILD=ON \
-DLLVM_ENABLE_LLD=ON \
-DMLIR_ENABLE_BINDINGS_PYTHON=ON \
Expand Down
2 changes: 0 additions & 2 deletions utils/build-mlir-aie.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ cd $BUILD_DIR
set -o pipefail
set -e
cmake -GNinja\
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DLLVM_DIR=${LLVM_BUILD_DIR}/lib/cmake/llvm \
-DMLIR_DIR=${LLVM_BUILD_DIR}/lib/cmake/mlir \
-DCMAKE_MODULE_PATH=${CMAKEMODULES_DIR}/modulesXilinx \
Expand Down

0 comments on commit d2193e4

Please sign in to comment.