Skip to content

Instantly share code, notes, and snippets.

@vegardsjo
Created October 17, 2012 16:15
Show Gist options
  • Select an option

  • Save vegardsjo/3906446 to your computer and use it in GitHub Desktop.

Select an option

Save vegardsjo/3906446 to your computer and use it in GitHub Desktop.
Wrapper for ld to make dmd accept -L"-framework=name"
import std.process;
import std.regex;
import std.array;
const string executable = "ld.orig";
void main(string argv[])
{
auto reg = regex(r"-framework=([^ ]+)", "g");
auto cmdline = replace(argv[1..$].join(" "), reg, r"-framework $1");
execvp(executable, cmdline.split());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment