aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource
diff options
context:
space:
mode:
authorPatrick Meyer <meyerpatrick@google.com>2021-05-08 20:39:02 +0200
committerDmitry Vyukov <dvyukov@google.com>2021-05-20 13:29:54 +0200
commit0f87d2b200b5025fb813cd728e71d9a386595f8a (patch)
tree06f706bd8b5cf82c137f1d52a6f89c9333ae8960 /pkg/csource
parenta343ba6b077a3efe7feb57783dcbb7496d2c3572 (diff)
sys/targets: add darwin/amd64 target
Diffstat (limited to 'pkg/csource')
-rw-r--r--pkg/csource/common.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/csource/common.go b/pkg/csource/common.go
index fe1655c13..c323335ad 100644
--- a/pkg/csource/common.go
+++ b/pkg/csource/common.go
@@ -28,6 +28,9 @@ const (
func createCommonHeader(p, mmapProg *prog.Prog, replacements map[string]string, opts Options) ([]byte, error) {
defines := defineList(p, mmapProg, opts)
sysTarget := targets.Get(p.Target.OS, p.Target.Arch)
+ // TODO(HerrSpace): -fdirectives-only isn't supported by clang. This code
+ // is relevant for producing C reproducers. Hence that doesn't work for
+ // darwin at the moment.
cmd := osutil.Command(sysTarget.CPP, "-nostdinc", "-undef", "-fdirectives-only", "-dDI", "-E", "-P", "-")
for _, def := range defines {
cmd.Args = append(cmd.Args, "-D"+def)