This repository was archived by the owner on Nov 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +66
-64
lines changed
Expand file tree Collapse file tree 8 files changed +66
-64
lines changed Original file line number Diff line number Diff line change 3838 ld : ld
3939 ar : ar
4040 run : |
41- $CC --version
41+ $CXX --version
4242 make tests/run
4343
4444 - name : test on windows (msvc)
4949 run : |
5050 make tests/run
5151
52- - name : test on windows (mingw)
53- os : windows-latest
54- target : x86_64-pc-windows-gnu
55- cxx : g++
56- ld : ld
57- ar : ar
58- run : |
59- gcc --version
60- make tests/run
61-
6252 - name : valgrind
6353 os : ubuntu-latest
6454 target : x86_64-unknown-linux-gnu
7767 cxx : clang++-12
7868 ld : ld.lld-12
7969 ar : llvm-ar-12
80- run : ASAN_OPTIONS=detect_leaks=1 CXXFLAGS="-fsanitize=address" make tests/run
70+ run : ASAN_OPTIONS=detect_leaks=1:alloc_dealloc_mismatch=0 CXXFLAGS="-fsanitize=address" make tests/run
8171
8272 steps :
8373 - name : setup msvc on windows
10393 RUSTFLAGS : " "
10494 run : |
10595 make do-codegen
106- make token_ids.h
96+ make token_ids.hpp
10797
10898 - name : run tests
10999 run : ${{ matrix.build.run }}
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ $(info O = $(O))
1010$(info A = $(A))
1111$(info STATIC_LIB_FILE = $(STATIC_LIB_FILE))
1212$(info LIST_DEPS = $(LIST_DEPS))
13- $(info CFLAGS = $(CFLAGS ))
13+ $(info CXXFLAGS = $(CXXFLAGS ))
1414
1515$(info add_to_lib = $(call add_to_lib,lib.$(A),object.$(O)))
16- $(info build_cxx_obj = $(call build_cxx_obj,file.c ,file.$(O)))
16+ $(info build_cxx_obj = $(call build_cxx_obj,file.cpp ,file.$(O)))
1717$(info build_cxx_exe = $(call build_cxx_exe,file.$(O),out))
1818
1919$(info )
Original file line number Diff line number Diff line change 66STATIC_LIB_FILE = libruby_parser_cpp.$(A )
77LIST_DEPS = otool -L
88
9- CXXFLAGS += -Wall -Wextra -Wpedantic -Weverything -g
9+ CXXFLAGS += -std=c++17 - Wall -Wextra -Wpedantic -Weverything -g
1010# but disable -Wpadded, we inherit Rust layouts
1111CXXFLAGS += -Wno-padded
1212# ignore C++98 compatibility
Original file line number Diff line number Diff line change 1+ $(info Compiling x86_64-pc-windows-msvc target)
2+
3+ O = obj
4+ A = lib
5+
6+ STATIC_LIB_FILE = ruby_parser_cpp.$(A )
7+ LIST_DEPS = dumpbin /dependents
8+
9+ # /nologo
10+ CXXFLAGS += /std:c++17 /bigobj /MT /Zi
11+
12+ ifeq ($(BUILD_ENV ) , debug)
13+ CXXFLAGS += /Od /DEBUG /DTEST_ENV
14+ else
15+ CXXFLAGS += /O2
16+ endif
17+
18+ define add_to_lib
19+ lib.exe $(1 ) $(2 ) /OUT:$(1 )
20+ endef
21+
22+ define build_cxx_obj
23+ $(CXX ) $(1 ) $(CXXFLAGS ) /c /Fo
24+ endef
25+
26+ define build_cxx_exe
27+ $(CXX ) ws2_32.lib advapi32.lib userenv.lib $(1 ) $(CXXFLAGS ) /link /OUT:$(2 )
28+ endef
29+
30+ BENCHMARK_RUNNER_ASSET_NAME = rust-parser-x86_64-pc-windows-msvc.exe
Original file line number Diff line number Diff line change 1+ $(info Compiling x86_64-unknown-linux-gnu target)
2+
3+ O = o
4+ A = a
5+
6+ STATIC_LIB_FILE = libruby_parser_cpp.$(A )
7+ LIST_DEPS = ldd
8+
9+ CXXFLAGS += -std=c++17 -Wall -Wextra -g -target $(TARGET )
10+
11+ ifeq ($(BUILD_ENV ) , debug)
12+ CXXFLAGS += -O0 -DTEST_ENV
13+ else
14+ CXXFLAGS += -O3
15+ endif
16+
17+ define add_to_lib
18+ $(AR ) r $(1 ) $(2 )
19+ endef
20+
21+ define build_cxx_obj
22+ $(CXX ) $(1 ) $(CXXFLAGS ) -c -o $(2 )
23+ endef
24+
25+ define build_cxx_exe
26+ $(CXX ) $(1 ) $(CXXFLAGS ) -lpthread -ldl -lm -o $(2 )
27+ endef
28+
29+ BENCHMARK_RUNNER_ASSET_NAME = rust-parser-x86_64-unknown-linux-gnu
Original file line number Diff line number Diff line change 33
44#include < cassert>
55#include < cstring>
6+ #include < cstdint>
67#include < utility>
78
89#define BLOB (T ) \
You can’t perform that action at this time.
0 commit comments