Skip to content

Commit 0d6aa87

Browse files
committed
Revert portable march option
1 parent a8f609e commit 0d6aa87

File tree

3 files changed

+10
-17
lines changed

3 files changed

+10
-17
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
submodules: recursive
2323
- name: build
2424
run: |
25-
cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_TEST=ON -DUSE_MARCH_NATIVE=OFF
25+
cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_TEST=ON
2626
cd build
2727
ninja
2828
- name: test
@@ -46,7 +46,7 @@ jobs:
4646
submodules: recursive
4747
- name: build
4848
run: |
49-
cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_TEST=ON -DUSE_MARCH_NATIVE=OFF
49+
cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_TEST=ON
5050
cd build
5151
ninja
5252
- name: test
@@ -70,7 +70,7 @@ jobs:
7070
submodules: recursive
7171
- name: build
7272
run: |
73-
cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_TEST=ON -DUSE_CONCRETE=ON -DUSE_MARCH_NATIVE=OFF
73+
cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_TEST=ON -DUSE_CONCRETE=ON
7474
cd build
7575
ninja
7676
- name: test
@@ -94,7 +94,7 @@ jobs:
9494
submodules: recursive
9595
- name: build
9696
run: |
97-
cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_TUTORIAL=ON -DUSE_MARCH_NATIVE=OFF
97+
cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_TUTORIAL=ON
9898
cd build
9999
ninja
100100
- name: run tutorial
@@ -124,7 +124,7 @@ jobs:
124124
submodules: recursive
125125
- name: build
126126
run: |
127-
/cmake-binary/bin/cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_LINKER_TYPE=LLD -DENABLE_TEST=ON -DUSE_MARCH_NATIVE=OFF
127+
/cmake-binary/bin/cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_LINKER_TYPE=LLD -DENABLE_TEST=ON
128128
cd build
129129
ninja
130130
- name: test

CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@ cmake_minimum_required(VERSION 3.16)
22
project(tfhe++ CXX C)
33
set(CMAKE_CXX_STANDARD 20)
44
option(DEBUG "Debug mode" OFF)
5-
option(USE_MARCH_NATIVE "Enable -march=native" ON)
6-
set(TFHEPP_BASE_CXX_FLAGS "-g -Wall -Wextra -pedantic -Wno-sign-compare")
7-
if(USE_MARCH_NATIVE)
8-
string(APPEND TFHEPP_BASE_CXX_FLAGS " -march=native")
9-
endif()
105
if(DEBUG)
11-
set(CMAKE_CXX_FLAGS "${TFHEPP_BASE_CXX_FLAGS}")
6+
set(CMAKE_CXX_FLAGS
7+
"-march=native -g -Wall -Wextra -pedantic -Wno-sign-compare")
128
else()
13-
set(CMAKE_CXX_FLAGS "${TFHEPP_BASE_CXX_FLAGS} -O3 -funroll-loops")
9+
set(CMAKE_CXX_FLAGS
10+
"-march=native -O3 -g -funroll-loops -Wall -Wextra -pedantic -Wno-sign-compare"
11+
)
1412
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
1513
endif()
1614

docs/Build.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ Build products:
4444
- `-DENABLE_SHARED=ON` — build `tfhe++` as a shared library.
4545
- `-DDEBUG=ON` — disable `-O3`, enable debug flags.
4646

47-
Toolchain / CPU flags:
48-
49-
- `-DUSE_MARCH_NATIVE=ON` (default) — enable `-march=native` for CPU‑tuned builds.
50-
- `-DUSE_MARCH_NATIVE=OFF` — build portable binaries (useful in CI or mixed CPUs).
51-
5247
Randomness:
5348

5449
- `-DUSE_BLAKE3=ON` (default) — BLAKE3‑XOF CSPRNG.

0 commit comments

Comments
 (0)