Skip to content

Commit 1c5c8e6

Browse files
authored
Merge pull request DOCGroup#209 from jwillemsen/jwi-bmakepdb2
[bmake] Use pdb flags with ld.lld
2 parents 6154bab + 447f1d8 commit 1c5c8e6

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

templates/bmake.mpd

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
!ifdef <%normalize(uc(compiler))%>
1111
CC = <%cc%>
1212
OPTIMIZE_CFLAGS = <%optimize_flags%>
13+
PDB_FLAGS = <%pdb_flags%>
1314
DEBUG_CFLAGS = <%debug_flags%>
1415
RELEASE_CFLAGS = <%release_flags%>
1516
CC_CFLAGS = <%ccflags%>
@@ -48,24 +49,25 @@ LINKER_EXE_ARGUMENTS = <%linker_exe_arguments%>
4849

4950
<%foreach(configurations)%>
5051
!ifdef <%normalize(uc(configuration))%>
51-
OCFLAGS = <%if(optimize)%>$(OPTIMIZE_CFLAGS)<%else%><%if(debug_prj)%> $(DEBUG_CFLAGS)<%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%><%if(!debug_prj)%> $(RELEASE_CFLAGS)<%endif%>
52-
CFG_DIR = <%intermediate_dir%>\\
53-
LIBMODIFIER = <%if(use_lib_modifier)%><%lib_modifier%><%endif%>
54-
EXEMODIFIER = <%if(use_exe_modifier)%><%lib_modifier%><%endif%>
52+
OCFLAGS = <%if(optimize)%>$(OPTIMIZE_CFLAGS) <%else%><%if(debug_prj)%>$(DEBUG_CFLAGS)<%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%><%if(!debug_prj)%> $(RELEASE_CFLAGS)<%endif%>
53+
LFLAGS =<%if(debug_prj)%> $(PDB_FLAGS)<%endif%>
54+
CFG_DIR = <%intermediate_dir%>\\
55+
LIBMODIFIER = <%if(use_lib_modifier)%><%lib_modifier%><%endif%>
56+
EXEMODIFIER = <%if(use_exe_modifier)%><%lib_modifier%><%endif%>
5557
<%if(type_is_static)%>
56-
STATIC_CFG = 1
58+
STATIC_CFG = 1
5759
<%endif%>
5860
<%if(type_is_static || need_staticflags)%>
5961
<%if(staticflags)%>
6062
STATIC_FLAGS =<%foreach(staticflags)%> -D<%staticflag%><%endfor%>
6163
<%endif%>
6264
<%else%>
6365
<%if(dynamicflags)%>
64-
DYN_FLAGS =<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%>
66+
DYN_FLAGS =<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%>
6567
<%endif%>
6668
<%endif%>
6769
<%if(postlinkrmext)%>
68-
POSTLINKRM = <%postlinkrmext%>
70+
POSTLINKRM = <%postlinkrmext%>
6971
<%endif%>
7072
<%if(exename)%>
7173
EXEOUTPUTDIR = <%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir("Debug")%><%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%><%endif%>\\
@@ -128,6 +130,7 @@ OBJFILES = \
128130
<%if(libpaths)%>
129131

130132
LFLAGS = \
133+
$(LFLAGS) \
131134
$(LINKER_PATHS) \
132135
<%if(debug_prj)%>
133136
-v \

templates/bmakecommon.mpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ bcc32 {
1818
debug_flags = -v -y -Od -vi- -k
1919
release_flags =
2020
optimize_flags = -O1
21+
pdb_flags =
2122
warn_flags = -w-rvl -w-rch -w-ccc -w-obs -w-aus -w-pia -w-inl -w-mls
2223
stack_flag = /S:
2324
cc = bcc32
@@ -45,6 +46,7 @@ bcc32c {
4546
debug_flags = -Od -vi-
4647
release_flags =
4748
optimize_flags = -O3
49+
pdb_flags =
4850
warn_flags =
4951
stack_flag = /S:
5052
cc = bcc32c
@@ -71,6 +73,7 @@ bcc64 {
7173
debug_flags = -g -O0
7274
release_flags =
7375
optimize_flags = -O3
76+
pdb_flags =
7477
warn_flags =
7578
stack_flag = /S:
7679
cc = bcc64
@@ -97,6 +100,7 @@ bcc64x {
97100
debug_flags = -g -O0
98101
release_flags = -Wno-ignored-attributes
99102
optimize_flags = -O3
103+
pdb_flags = -pdb $(OUTPUTDIR)$(NAME).pdb
100104
warn_flags =
101105
stack_flag = --stack=
102106
cc = bcc64x

0 commit comments

Comments
 (0)