Skip to content

Commit

Permalink
gn: fix failing security checks in binskip
Browse files Browse the repository at this point in the history
Many thanks to ivberg@ for the inspiration (see linked issue)!

Fixes: #635
Change-Id: Ib333fc79b2493019743cc026f43e384390fdbc30
  • Loading branch information
LalitMaganti committed Nov 13, 2023
1 parent fcaab14 commit 2a4f01d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gn/standalone/toolchain/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ toolchain("msvc") {
tool("cc") {
precompiled_header_type = "msvc"
pdbname = "{{target_out_dir}}/{{label_name}}_c.pdb"
command = "$cc_wrapper $cc /nologo /showIncludes /FC {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
command = "$cc_wrapper $cc /nologo /showIncludes /FC {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\" /guard:cf /ZH:SHA_256"
depsformat = "msvc"
outputs =
[ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj" ]
Expand All @@ -430,7 +430,7 @@ toolchain("msvc") {
tool("cxx") {
precompiled_header_type = "msvc"
pdbname = "{{target_out_dir}}/{{label_name}}_c.pdb"
command = "$cc_wrapper $cxx /nologo /showIncludes /FC {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
command = "$cc_wrapper $cxx /nologo /showIncludes /FC {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\" /guard:cf /ZH:SHA_256"
depsformat = "msvc"
outputs =
[ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj" ]
Expand Down Expand Up @@ -490,7 +490,7 @@ toolchain("msvc") {
pdbname = "$exename.pdb"
rspfile = "$exename.rsp"

command = "$linker /nologo /OUT:$exename ${sys_lib_flags} /DEBUG /PDB:$pdbname @$rspfile"
command = "$linker /nologo /guard:cf /DYNAMICBASE /OUT:$exename ${sys_lib_flags} /DEBUG /PDB:$pdbname @$rspfile"
default_output_extension = ".exe"
default_output_dir = "{{root_out_dir}}"
outputs = [ exename ]
Expand Down

0 comments on commit 2a4f01d

Please sign in to comment.