Commit 2ae02ab 1 parent a1b3b95 commit 2ae02ab Copy full SHA for 2ae02ab
File tree 3 files changed +30
-2
lines changed
3 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 5
5
### Build dependencies
6
6
7
7
- GNU Bash
8
- - GNU g++ version 9 +
8
+ - GNU g++ version 7 +
9
9
- GNU make
10
10
11
11
### Code formatter (optional)
@@ -25,10 +25,16 @@ $ sudo make install
25
25
26
26
### Native build
27
27
28
+ Linux, Windows:
28
29
```
29
30
$ make
30
31
```
31
32
33
+ MacOS X and BSD-likes:
34
+ ```
35
+ $ CXX=scripts/darwin.sh make
36
+ ```
37
+
32
38
### Cross-compiling
33
39
34
40
Simply override CXX to use your target toolchain.
Original file line number Diff line number Diff line change @@ -3,8 +3,14 @@ set -euo pipefail
3
3
4
4
export BIN=${BIN-bin}
5
5
6
+ if [ $( uname -s) == " Darwin" ]; then
7
+ CORES=$( sysctl -n hw.logicalcpu)
8
+ else
9
+ CORES=$( nproc)
10
+ fi
11
+
6
12
./scripts/reformat.sh
7
- make -j` nproc `
13
+ CXX= $CXX make -j$CORES
8
14
./tests/run $BIN
9
15
10
16
lines=$( find $BIN -name " *.lines" | xargs cat | awk ' {s+=$1} END {printf "%d\n", (s/1000)}' )
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ set -eu
3
+
4
+ params=()
5
+ for p in " $@ " ; do
6
+ case $p in
7
+ -Wl,-gc-sections)
8
+ ;;
9
+ * )
10
+ params+=(" $p " )
11
+ ;;
12
+ esac
13
+ done
14
+
15
+ " /usr/bin/g++" " ${params[@]} "
16
+
You can’t perform that action at this time.
0 commit comments