Ticket #5305: build_intel_win_v2.patch
File build_intel_win_v2.patch, 4.9 KB (added by , 11 years ago) |
---|
-
tools/intel-win.
old new 14 14 import toolset ; 15 15 import generators ; 16 16 import type ; 17 import path ; 17 18 18 19 feature.extend-subfeature toolset intel : platform : win ; 19 20 … … 44 45 local condition = [ common.check-init-parameters intel-win 45 46 : version $(version) : compatibility $(compatibility) ] ; 46 47 48 local m = [ MATCH ([0-9]+).* : $(version) ] ; 49 local major = $(m[1]) ; 50 47 51 command = [ common.get-invocation-command intel-win : icl.exe : 48 52 $(command) ] ; 49 53 … … 53 57 if $(command) 54 58 { 55 59 root = [ common.get-absolute-tool-path $(command[-1]) ] ; 60 if $(major) >= 12 61 { 62 root = [ path.parent $(root) ] ; 63 } 56 64 root = $(root)/ ; 57 65 } 58 66 … … 61 69 if ! $(setup) 62 70 { 63 71 setup = $(root)/iclvars.bat ; 72 setup = [ path.native $(setup) ] ; 73 } 74 75 local target_types ; 76 local iclvars_vs_arg ; 77 if $(major) >= 12 78 { 79 if $(compatibility) = vc10 80 { 81 iclvars_vs_arg = vs2010 ; 82 } 83 else if $(compatibility) = vc9 84 { 85 iclvars_vs_arg = vs2008 ; 86 } 87 else if $(compatibility) = vc8 88 { 89 iclvars_vs_arg = vs2005 ; 90 } 91 92 if [ MATCH ^(AMD64) : [ os.environ PROCESSOR_ARCHITECTURE ] ] 93 { 94 target_types = ia32 intel64 ; 95 } 96 else 97 { 98 target_types = ia32 ia32_intel64 ; 99 } 100 } 101 else 102 { 103 target_types = default ; 104 iclvars_vs_arg = $(compatibility) ; 105 } 106 107 for local c in $(target_types) 108 { 109 local cpu-conditions ; 110 local setup-call ; 111 if $(major) >= 12 112 { 113 setup-call = "call \""$(setup)"\" $(c) $(iclvars_vs_arg) > nul " ; 114 cpu-conditions = $(condition)/$(.cpu-arch-$(c)) ; 115 } 116 else 117 { 118 setup-call = "call \""$(setup)"\" $(compatibility) > nul " ; 119 cpu-conditions = $(condition) ; 64 120 } 65 setup = "call \""$(setup)"\" > nul " ;66 121 67 122 if [ os.name ] = NT 68 123 { 69 setup = $(setup)"124 setup-call = $(setup-call)" 70 125 " ; 71 126 } 72 127 else 73 128 { 74 setup = "cmd /S /C "$(setup)" \"&&\" " ;129 setup-call = "cmd /S /C "$(setup-call)" \"&&\" " ; 75 130 } 76 131 77 toolset.flags intel-win.compile .CC $(condition) : $(setup)icl ; 78 toolset.flags intel-win.link .LD $(condition) : $(setup)xilink ; 79 toolset.flags intel-win.archive .LD $(condition) : $(setup)xilink /lib ; 80 toolset.flags intel-win.link .MT $(condition) : $(setup)mt -nologo ; 81 toolset.flags intel-win.compile .MC $(condition) : $(setup)mc ; 82 toolset.flags intel-win.compile .RC $(condition) : $(setup)rc ; 132 if $(.debug-configuration) 133 { 134 for local cpu-condition in $(cpu-conditions) 135 { 136 ECHO "notice: [intel-cfg] condition: '$(cpu-condition)', setup: '$(setup-call)'" ; 137 } 138 } 83 139 84 local m = [ MATCH (.).* : $(version) ] ; 85 local major = $(m[1]) ; 140 toolset.flags intel-win.compile .CC $(cpu-conditions) : $(setup-call)icl ; 141 toolset.flags intel-win.link .LD $(cpu-conditions) : $(setup-call)xilink /nologo ; 142 toolset.flags intel-win.archive .LD $(cpu-conditions) : $(setup-call)xilink /lib /nologo ; 143 toolset.flags intel-win.link .MT $(cpu-conditions) : $(setup-call)mt -nologo ; 144 toolset.flags intel-win.compile .MC $(cpu-conditions) : $(setup-call)mc ; 145 toolset.flags intel-win.compile .RC $(cpu-conditions) : $(setup-call)rc ; 146 } 86 147 87 148 local C++FLAGS ; 88 149 … … 96 157 97 158 # Disable Microsoft "secure" overloads in Dinkumware libraries since they 98 159 # cause compile errors with Intel versions 9 and 10. 160 if $(major) < 12 161 { 99 162 C++FLAGS += -D_SECURE_SCL=0 ; 163 } 100 164 101 165 if $(major) > 5 102 166 { … … 135 199 136 200 if $(compatibility) && $(compatibility) != native 137 201 { 138 C++FLAGS += /Q$( base-vc) ;202 C++FLAGS += /Q$(compatibility) ; 139 203 } 140 204 else 141 205 { … … 178 242 msvc.configure-version-specific intel-win : $(extract-version[1]) : $(condition) ; 179 243 } 180 244 245 246 if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] 247 { 248 .debug-configuration = true ; 249 } 250 251 # Copied from msvc.jam 252 # Supported CPU architectures. 253 .cpu-arch-ia32 = 254 <architecture>/<address-model> 255 <architecture>/<address-model>32 256 <architecture>x86/<address-model> 257 <architecture>x86/<address-model>32 ; 258 259 .cpu-arch-intel64 = 260 <architecture>/<address-model>64 261 <architecture>x86/<address-model>64 ; 262 263 .cpu-arch-ia32_intel64 = 264 <architecture>/<address-model>64 265 <architecture>x86/<address-model>64 ; 266 181 267 toolset.flags intel-win.link LIBRARY_OPTION <toolset>intel : "" ; 182 268 183 269 toolset.flags intel-win YLOPTION ;