Skip to content

Instantly share code, notes, and snippets.

@horus
Created October 23, 2013 13:45
Show Gist options
  • Select an option

  • Save horus/7119051 to your computer and use it in GitHub Desktop.

Select an option

Save horus/7119051 to your computer and use it in GitHub Desktop.
OSX Mavericks & Xcode 5: clang wrapper script for GHC 7.6.3
#!/usr/bin/perl
use strict;
use warnings;
my $argv = join ' ', @ARGV;
if (index($argv, '-E')+1 && index($argv, '-undef')+1 && index($argv, '-traditional')+1) {
$argv =~ s/-x c/-x assembler-with-cpp/g;
@ARGV = split ' ', $argv;
unshift @ARGV, qw(-Wno-invalid-pp-token -Wno-unicode -Wno-trigraphs);
}
system '/usr/bin/clang', @ARGV;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment