Permalink
Browse files

Merge pull request #198 from dabrahams/patch-1

Handle arguments -target & -F

These arguments are needed to build Swift on MacOS.  

"-F" introduces a "framework path." A framework is a bundle of related libraries (usually one) and headers under a single directory. Adding a framework path effectively adds all of its */Headers directories to the -I #include path.
2 parents 87f21f9 + 70f9e76 commit 6f886a5a13cbe1a9529595194420d717c6c53fc2 @TafThorne TafThorne committed on GitHub Oct 13, 2016
Showing with 3 additions and 0 deletions.
  1. +3 −0 include_server/parse_command.py
@@ -24,6 +24,7 @@
import re
import os
import sys
+import glob
import basics
import cache_basics
@@ -99,6 +100,7 @@ def _RaiseNotImplemented(name, comment=''):
'-MT': lambda ps, arg: None,
'-MQ': lambda ps, arg: None,
'-arch': lambda ps, arg: None,
+ '-target': lambda ps, arg: None,
'-include': lambda ps, arg: ps.include_files.append(arg),
'-imacros': lambda ps, arg: ps.include_files.append(arg),
'-idirafter': lambda ps, arg: ps.after_system_dirs.append(arg),
@@ -179,6 +181,7 @@ def _RaiseNotImplemented(name, comment=''):
# preprocessor-related, they are all noops.
'A': lambda ps, arg: None,
'l': lambda ps, arg: None,
+ 'F': lambda ps, arg: ps.i_dirs.extend(glob.glob(os.path.join(arg,'*', 'Headers'))),
'u': lambda ps, arg: None,
'L': lambda ps, arg: None,
'B': lambda ps, arg: None,

0 comments on commit 6f886a5

Please sign in to comment.