Skip to content

Commit f18c18e

Browse files
authored
Enable LTO on the Linux Clang build on CI (#3491)
Also adjust the check for Clang to also match AppleClang
1 parent d949823 commit f18c18e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
run: python check.py --binaryen-bin=out/bin
102102

103103
build-clang:
104-
name: clang
104+
name: clang (LTO)
105105
runs-on: ubuntu-latest
106106
steps:
107107
- uses: actions/setup-python@v1
@@ -115,9 +115,9 @@ jobs:
115115
- name: cmake
116116
run: |
117117
mkdir -p out
118-
cmake -S . -B out -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
118+
cmake -S . -B out -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DBYN_ENABLE_LTO=ON
119119
- name: build
120-
run: cmake --build out
120+
run: cmake --build out -v
121121
- name: test binaryen-lit
122122
run: python out/bin/binaryen-lit test/lit/parse-error.wast
123123
- name: test

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ ENDFOREACH()
137137

138138
option(BYN_ENABLE_LTO "Build with LTO" Off)
139139
if(BYN_ENABLE_LTO)
140-
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
140+
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
141141
message(FATAL_ERROR "ThinLTO is only supported by clang")
142142
endif()
143143
if(NOT APPLE)

0 commit comments

Comments
 (0)