set clang as default

This commit is contained in:
blueloveTH 2023-03-04 19:34:47 +08:00
parent 1e15cb2af2
commit ac4b0a2740
7 changed files with 14 additions and 3 deletions

View File

@ -50,6 +50,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Clang
uses: egor-tensin/setup-clang@v1
with:
version: 15
platform: x64
- name: Compiling
run: |
bash build_cpp.sh

1
.gitignore vendored
View File

@ -2,6 +2,7 @@ __pycache__/
.vscode
.ipynb_checkpoints
.DS_Store
.hidden
src/main
gmon.out

View File

@ -1 +1 @@
g++ -o pocketpy src/main.cpp -Wfatal-errors --std=c++17 -O2 -Wall -Wno-sign-compare -Wno-unused-variable -fno-rtti
clang++ -o pocketpy src/main.cpp -Wfatal-errors --std=c++17 -O2 -Wall -Wno-sign-compare -Wno-unused-variable -fno-rtti

View File

@ -1,3 +1,3 @@
echo '#include "pocketpy.h"' > src/tmp.cpp
g++ -fPIC -shared -o pocketpy.so src/tmp.cpp --std=c++17 -O2 -Wall -Wno-sign-compare -Wno-unused-variable -fno-rtti
clang++ -fPIC -shared -o pocketpy.so src/tmp.cpp --std=c++17 -O2 -Wall -Wno-sign-compare -Wno-unused-variable -fno-rtti
rm src/tmp.cpp

4
compile_flags.txt Normal file
View File

@ -0,0 +1,4 @@
-xc++
-Wall
-W*
-std=c++17

View File

@ -81,6 +81,6 @@ const float kInstAttrLoadFactor = 0.67;
const float kTypeAttrLoadFactor = 0.5;
// do extra check for debug
#define PK_EXTRA_CHECK
// #define PK_EXTRA_CHECK
} // namespace pkpy

View File

@ -1,5 +1,6 @@
#pragma once
#include "error.h"
#include "obj.h"
namespace pkpy{