blueloveTH 2 лет назад
Родитель
Сommit
e6c5ace927
6 измененных файлов с 10 добавлено и 11 удалено
  1. 5 2
      .github/workflows/main.yml
  2. 0 4
      README.md
  3. 2 2
      amalgamate.py
  4. 1 1
      build.sh
  5. 1 1
      run_profile.sh
  6. 1 1
      run_tests.sh

+ 5 - 2
.github/workflows/main.yml

@@ -61,8 +61,11 @@ jobs:
         path: output
     - name: Benchmark
       run: python3 scripts/run_tests.py benchmark
-    # - name: GCC Build Test
-    #   run: g++ -o pocketpy --std=c++17 src/main.cpp
+    - name: GCC Build Test
+      run: |
+        SRC=$(find src/ -name "*.cpp")
+        g++ -o main --std=c++17 src/main.cpp $SRC
+        python3 scripts/run_tests.py
     - name: C Binding Test
       run: bash run_c_binding_test.sh
   build_macos:

+ 0 - 4
README.md

@@ -43,10 +43,6 @@ To compile it with your project, these flags must be set:
 + RTTI is not required
 + If clang is used, `-stdlib=libc++` must be set
 
-!!!
-For maximum performance, we recommend to use `clang++` with `-O2` flag.
-!!!
-
 ### Example
 
 ```cpp

+ 2 - 2
amalgamate.py

@@ -81,10 +81,10 @@ with open("amalgamated/main.cpp", "wt", encoding='utf-8') as f:
 	f.write(text)
 
 if sys.platform in ['linux', 'darwin']:
-	ok = os.system("clang++ -o pocketpy amalgamated/main.cpp --std=c++17 -stdlib=libc++ -ldl")
+	ok = os.system("clang++ -o main amalgamated/main.cpp --std=c++17 -stdlib=libc++ -ldl")
 	if ok == 0:
 		print("Test build success!")
-		os.remove("pocketpy")
+		os.remove("main")
 
 print("amalgamated/pocketpy.h")
 

+ 1 - 1
build.sh

@@ -1,3 +1,3 @@
 python3 prebuild.py
 SRC=$(find src/ -name "*.cpp")
-clang++ -std=c++17 -fno-rtti -O2 -stdlib=libc++ -Wfatal-errors -o pocketpy src2/main.cpp $SRC -Iinclude -ldl
+clang++ -std=c++17 -fno-rtti -O2 -stdlib=libc++ -Wfatal-errors -o main src2/main.cpp $SRC -Iinclude -ldl

+ 1 - 1
run_profile.sh

@@ -1,6 +1,6 @@
 python3 prebuild.py
 SRC=$(find src/ -name "*.cpp")
-clang++ -pg -O1 -std=c++17 -fno-rtti -stdlib=libc++ -Wfatal-errors -o pocketpy $SRC -Iinclude
+clang++ -pg -O1 -std=c++17 -fno-rtti -stdlib=libc++ -Wfatal-errors -o main $SRC -Iinclude
 time ./main benchmarks/fib.py
 mv benchmarks/gmon.out .
 gprof pocketpy gmon.out > gprof.txt

+ 1 - 1
run_tests.sh

@@ -1,6 +1,6 @@
 python3 prebuild.py
 SRC=$(find src/ -name "*.cpp")
-clang++ -std=c++17 -fno-rtti --coverage -O1 -stdlib=libc++ -Wfatal-errors -o pocketpy src2/main.cpp $SRC -Iinclude
+clang++ -std=c++17 -fno-rtti --coverage -O1 -stdlib=libc++ -Wfatal-errors -o main src2/main.cpp $SRC -Iinclude
 python3 scripts/run_tests.py
 rm -rf .coverage
 mkdir .coverage