summaryrefslogtreecommitdiff
path: root/Build/collect-ghc-options.sh
blob: 4f75a7202eee9ddfe69a9f812d9a765d0c02eecb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
# Generate --ghc-options to pass LDFLAGS, CFLAGS, and CPPFLAGS through ghc
# and on to ld, cc, and cpp.
for w in $LDFLAGS; do
	printf -- "-optl%s\n" "$w"
done
for w in $CFLAGS; do
	printf -- "-optc%s\n" "$w"
done
for w in $CPPFLAGS; do
	printf -- "-optc-Wp,%s\n" "$w"
done