diff --git a/tools/build/v2/tools/clang-darwin.jam b/tools/build/v2/tools/clang-darwin.jam
index a8abc7d..e43d933 100644
a
|
b
|
import gcc ;
|
13 | 13 | import common ; |
14 | 14 | import errors ; |
15 | 15 | import generators ; |
| 16 | import darwin ; |
16 | 17 | |
17 | 18 | feature.extend-subfeature toolset clang : platform : darwin ; |
18 | 19 | |
… |
… |
SPACE = " " ;
|
74 | 75 | |
75 | 76 | flags clang-darwin.compile OPTIONS <cflags> ; |
76 | 77 | flags clang-darwin.compile OPTIONS <cxxflags> ; |
| 78 | flags clang-darwin.compile FRAMEWORK <framework> ; |
77 | 79 | # flags clang-darwin.compile INCLUDES <include> ; |
78 | 80 | |
79 | 81 | # Declare flags and action for compilation. |
… |
… |
toolset.flags clang-darwin.compile OPTIONS <debug-symbols>on : -g ;
|
94 | 96 | toolset.flags clang-darwin.compile OPTIONS <profiling>on : -pg ; |
95 | 97 | toolset.flags clang-darwin.compile OPTIONS <rtti>off : -fno-rtti ; |
96 | 98 | |
| 99 | rule compile.c ( targets * : sources * : properties * ) |
| 100 | { |
| 101 | darwin.prepare-framework-path $(<) ; |
| 102 | } |
| 103 | |
97 | 104 | actions compile.c |
98 | 105 | { |
99 | | "$(CONFIG_COMMAND)" -x c $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" |
| 106 | "$(CONFIG_COMMAND)" -x c $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" $(FRAMEWORK_PATH) -c -o "$(<)" "$(>)" |
| 107 | } |
| 108 | |
| 109 | rule compile.c++ ( targets * : sources * : properties * ) |
| 110 | { |
| 111 | darwin.prepare-framework-path $(<) ; |
100 | 112 | } |
101 | 113 | |
102 | 114 | actions compile.c++ |
103 | 115 | { |
104 | | "$(CONFIG_COMMAND)" -x c++ $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" |
| 116 | "$(CONFIG_COMMAND)" -x c++ $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" $(FRAMEWORK_PATH) -c -o "$(<)" "$(>)" |
105 | 117 | } |
106 | 118 | |
107 | 119 | flags clang-darwin ARFLAGS <archiveflags> ; |
… |
… |
actions piecemeal archive
|
149 | 161 | } |
150 | 162 | |
151 | 163 | flags clang-darwin.link USER_OPTIONS <linkflags> ; |
| 164 | flags clang-darwin.link FRAMEWORK <framework> ; |
152 | 165 | |
153 | 166 | # Declare actions for linking |
154 | 167 | rule link ( targets * : sources * : properties * ) |
… |
… |
rule link ( targets * : sources * : properties * )
|
157 | 170 | # Serialize execution of the 'link' action, since |
158 | 171 | # running N links in parallel is just slower. |
159 | 172 | JAM_SEMAPHORE on $(targets) = <s>clang-darwin-link-semaphore ; |
| 173 | darwin.prepare-framework-path $(<) ; |
160 | 174 | } |
161 | 175 | |
162 | 176 | actions link bind LIBRARIES |
163 | 177 | { |
164 | | "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS) |
| 178 | "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(FRAMEWORK_PATH) -framework$(SPACE)$(FRAMEWORK:D=:S=) $(OPTIONS) |
165 | 179 | } |
166 | 180 | |
167 | 181 | actions link.dll bind LIBRARIES |
168 | 182 | { |
169 | | "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" -single_module -dynamiclib -install_name "$(<[1]:D=)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS) |
| 183 | "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" -single_module -dynamiclib -install_name "$(<[1]:D=)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(FRAMEWORK_PATH) -framework$(SPACE)$(FRAMEWORK:D=:S=) $(OPTIONS) |
170 | 184 | } |
diff --git a/tools/build/v2/tools/darwin.jam b/tools/build/v2/tools/darwin.jam
index dd6eacb..4955576 100644
a
|
b
|
flags darwin.link FORCE_LOAD <force-load> ;
|
529 | 529 | _ = " " ; |
530 | 530 | |
531 | 531 | # set up the -F option to include the paths to any frameworks used. |
532 | | local rule prepare-framework-path ( target + ) |
| 532 | rule prepare-framework-path ( target + ) |
533 | 533 | { |
534 | 534 | # The -framework option only takes basename of the framework. |
535 | 535 | # The -F option specifies the directories where a framework |