Skip to content

Commit

Permalink
Linker filters .res files
Browse files Browse the repository at this point in the history
  • Loading branch information
moloch-- committed Jan 17, 2021
1 parent fce8028 commit 51c5e8f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkg/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,15 @@ func Compile(build *Build, obfArgs *ollvm.ObfArgs) error {
return err
}
}
linker := strings.Fields(nimProject.LinkCmd)
if linker[0] == "clang" || linker[0] == "clang.exe" {
linker = linker[1:]

linker := []string{"-o", nimProject.OutputFile}
for _, link := range nimProject.Link {
if strings.HasSuffix(link, ".res") {
continue
}
linker = append(linker, link)
}
linker = append(linker, "-g")
stdout, stderr, err := clang.Compile(nimCache, linker)
if build.Verbose {
if 0 < len(stdout) {
Expand Down

0 comments on commit 51c5e8f

Please sign in to comment.