Skip to content

Commit 7aac6f0

Browse files
committed
Compiler things
1 parent d786b9e commit 7aac6f0

24 files changed

Lines changed: 143 additions & 8 deletions

File tree

etc/bashrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@ export WM_COMPILER_TYPE=system
7474

7575
#- Compiler:
7676
# WM_COMPILER = Gcc | Gcc48 ... Gcc62 | Clang | Icx
77-
export WM_COMPILER=Gcc
77+
export WM_COMPILER=DOCC # Clang #Gcc
7878
unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH
7979

80+
echo $WM_COMPILER
8081
#- Memory addressing:
8182
# On a 64bit OS this can be 32bit or 64bit
8283
# On a 32bit OS addressing is 32bit and this option is not used
@@ -89,7 +90,7 @@ export WM_PRECISION_OPTION=SP
8990

9091
#- Label size:
9192
# WM_LABEL_SIZE = 32 | 64
92-
export WM_LABEL_SIZE=32
93+
export WM_LABEL_SIZE=64
9394

9495
#- Optimised, debug, profiling:
9596
# WM_COMPILE_OPTION = Opt | Debug | Prof

etc/config.sh/compiler

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ OpenFOAM | ThirdParty)
3737
gmp_version=gmp-5.1.2
3838
mpfr_version=mpfr-3.1.2
3939
mpc_version=mpc-1.0.1
40+
41+
echo $WM_COMPILER
4042

4143
case "$WM_COMPILER" in
4244
Gcc55)
@@ -62,10 +64,14 @@ OpenFOAM | ThirdParty)
6264
;;
6365
Clang)
6466
# Using clang - not gcc
65-
export WM_CC='clang'
66-
export WM_CXX='clang++'
67+
export WM_CC='clang-15'
68+
export WM_CXX='clang++-15'
6769
clang_version=llvm-3.7.0
6870
;;
71+
DOCC)
72+
export WM_CC='docc'
73+
export WM_CXX='docc-cpp'
74+
;;
6975
*)
7076
/bin/cat <<USAGE 1>&2
7177

wmake/rules/linux64Clang/c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ SUFFIXES += .c
22

33
cWARN = -Wall
44

5-
cc = clang -m64
5+
cc = clang-15 -m64
66

77
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
88

wmake/rules/linux64Clang/c++

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor \
88
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs \
99
-Wno-tautological-undefined-compare -Wno-shift-negative-value
1010

11-
CC = clang++ -std=c++14 -m64
11+
CC = clang++-15 -std=c++14 -m64
1212

1313
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
1414

wmake/rules/linux64DOCC/c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
SUFFIXES += .c
2+
3+
cWARN = -Wall
4+
5+
cc = docc -m64
6+
7+
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
8+
9+
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
10+
11+
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
12+
13+
LINK_LIBS = $(cDBUG)
14+
15+
LINKLIBSO = $(cc) -shared
16+
LINKEXE = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs

wmake/rules/linux64DOCC/c++

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
SUFFIXES += .C
2+
3+
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor \
4+
-Wno-unused-parameter -Wno-invalid-offsetof \
5+
-Wno-undefined-var-template -Wno-unqualified-std-cast-call
6+
7+
# Suppress some warnings for flex++
8+
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs \
9+
-Wno-tautological-undefined-compare -Wno-shift-negative-value
10+
11+
CC = docc-cpp -std=c++14 -m64
12+
13+
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
14+
15+
ptFLAGS = -DNoRepository -ftemplate-depth-100
16+
17+
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) \
18+
$(LIB_HEADER_DIRS) -fPIC
19+
20+
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
21+
cxxtoo = $(Ctoo)
22+
cctoo = $(Ctoo)
23+
cpptoo = $(Ctoo)
24+
25+
LINK_LIBS = $(c++DBUG)
26+
27+
LINKLIBSO = $(CC) $(c++FLAGS) -shared
28+
LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed

wmake/rules/linux64DOCC/c++Debug

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
c++DBUG = -g -DFULLDEBUG
2+
c++OPT = -O0

wmake/rules/linux64DOCC/c++Opt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
c++DBUG =
2+
c++OPT = -O3

wmake/rules/linux64DOCC/c++Prof

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
c++DBUG = -pg
2+
c++OPT = -O2

wmake/rules/linux64DOCC/cDebug

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cDBUG = -g -DFULLDEBUG
2+
cOPT = -O0

0 commit comments

Comments
 (0)