Skip to content

Commit

Permalink
Fix copyright statement
Browse files Browse the repository at this point in the history
Compiler was previously adding source code when copyright statement was
in the source because the __Copyright variable was being marked as
internal by built-in optimization pass 'internalize', and removed by built-in
optimizers (likely globalopt, but not verified) because it wasn't used.

Fix this by adding it to the 'internalize-public-api-list' option.
  • Loading branch information
ragusaa authored and val-ms committed Jun 6, 2022
1 parent 86cf32f commit a43af8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clambcc/clambc-compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ def createInputSourceFile(clangLLVM: ClangLLVM, name: str, args: list, options:

def optimize(clangLLVM: ClangLLVM, inFile: str, outFile: str, sigFile: str, inputSourceFile: str, standardCompiler: bool) -> int:

internalizeAPIList = "_Z10entrypointv,entrypoint,__clambc_kind,__clambc_virusname_prefix,__clambc_virusnames,__clambc_filesize,__clambc_match_counts,__clambc_match_offsets,__clambc_pedata"
internalizeAPIList = "_Z10entrypointv,entrypoint,__clambc_kind,__clambc_virusname_prefix,__clambc_virusnames,__clambc_filesize,__clambc_match_counts,__clambc_match_offsets,__clambc_pedata,__Copyright"
if standardCompiler:
internalizeAPIList += ",main"

Expand Down

0 comments on commit a43af8f

Please sign in to comment.