bake-toolkit 2.49.0 → 2.50.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bake/config/loader.rb +20 -13
- data/lib/bake/model/metamodel.rb +1 -0
- data/lib/bake/options/options.rb +5 -2
- data/lib/bake/options/usage.rb +2 -0
- data/lib/bake/toolchain/diab.rb +5 -2
- data/lib/bake/toolchain/gcc.rb +6 -2
- data/lib/bake/toolchain/provider.rb +13 -5
- data/lib/bake/util.rb +3 -0
- data/lib/blocks/blockBase.rb +14 -0
- data/lib/blocks/compile.rb +39 -11
- data/lib/blocks/executable.rb +13 -7
- data/lib/blocks/library.rb +5 -3
- data/lib/common/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce5efe331210cc1e31546df0f648bf989d173ed5095cd3cd3ebf6e423941fe77
|
4
|
+
data.tar.gz: 8b9e09c9436b098878e281d02159bb2371b53c1d03ab0e1893b2a282dd8646e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d07d87f5322ad4d941b4da672eeb34c2da3f2d3e310c110b584e30fe01486a793918e74090fdb1adb5aa1e3005e62ad923ecf65a5af49d4a085d3534047cdc22
|
7
|
+
data.tar.gz: 4749a9fe550431e99305835df4c26b109e9145aef758f345f1fde3fd4823ec3c18c6b2e2e28d54da8519d0863aa16b607886b299053cc309383128fcb6956b5e
|
data/lib/bake/config/loader.rb
CHANGED
@@ -88,25 +88,32 @@ module Bake
|
|
88
88
|
# check if config has to be manipulated
|
89
89
|
@adaptConfigs.each do |c|
|
90
90
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
91
|
+
if isMain
|
92
|
+
@defaultToolchainName = config.defaultToolchain.basedOn unless config.defaultToolchain.nil?
|
93
|
+
@mainProjectName = config.parent.name
|
94
|
+
@mainConfigName = config.name
|
95
|
+
end
|
96
96
|
|
97
|
-
|
98
|
-
|
97
|
+
projSplitted = c.project.split(";")
|
98
|
+
confSplitted = c.name.split(";")
|
99
|
+
projPatterns = projSplitted.map { |p| /\A#{p.gsub("*", "(\\w*)")}\z/ }
|
100
|
+
confPatterns = confSplitted.map { |p| /\A#{p.gsub("*", "(\\w*)")}\z/ }
|
99
101
|
|
100
|
-
|
101
|
-
|
102
|
+
if projPatterns.any? {|p| p.match(config.parent.name) } \
|
103
|
+
|| (projName == Bake.options.main_project_name and projSplitted.any? {|p| p == "__MAIN__"}) \
|
104
|
+
|| projSplitted.any? {|p| p == "__ALL__"}
|
105
|
+
|
106
|
+
if confPatterns.any? {|p| p.match(config.name)} \
|
107
|
+
|| (isMain and confSplitted.any? {|p| p == "__MAIN__"}) \
|
108
|
+
|| confSplitted.any? {|p| p == "__ALL__"}
|
102
109
|
|
103
|
-
conditionProjPattern =
|
104
|
-
conditionConfPattern =
|
110
|
+
conditionProjPattern = c.parent.mainProject.split(";").map { |p| /\A#{p.gsub("*", "(\\w*)")}\z/ }
|
111
|
+
conditionConfPattern = c.parent.mainConfig.split(";").map { |p| /\A#{p.gsub("*", "(\\w*)")}\z/ }
|
105
112
|
|
106
113
|
adaptCondition = (c.parent.toolchain == "" || c.parent.toolchain == @defaultToolchainName) &&
|
107
114
|
(c.parent.os == "" || c.parent.os == Utils::OS.name) &&
|
108
|
-
(c.parent.mainProject == "" ||
|
109
|
-
(c.parent.mainConfig == "" ||
|
115
|
+
(c.parent.mainProject == "" || conditionProjPattern.any? {|p| p.match(@mainProjectName)}) &&
|
116
|
+
(c.parent.mainConfig == "" || conditionConfPattern.any? {|p| p.match(@mainConfigName)})
|
110
117
|
|
111
118
|
invertLogic = (Bake::Metamodel::Unless === c.parent)
|
112
119
|
next if (adaptCondition && invertLogic) || (!adaptCondition && !invertLogic)
|
data/lib/bake/model/metamodel.rb
CHANGED
@@ -79,6 +79,7 @@ module Bake
|
|
79
79
|
class Compiler < ModelElement
|
80
80
|
has_attr 'ctype', CompilerType
|
81
81
|
has_attr 'command', String, :defaultValueLiteral => ""
|
82
|
+
has_attr 'cuda', Boolean, :defaultValueLiteral => "false"
|
82
83
|
has_attr 'prefix', String, :defaultValueLiteral => ""
|
83
84
|
contains_many 'define', Define, 'parent'
|
84
85
|
contains_many 'flags', Flags, 'parent'
|
data/lib/bake/options/options.rb
CHANGED
@@ -23,7 +23,7 @@ module Bake
|
|
23
23
|
attr_reader :main_dir, :project, :filename, :main_project_name, :buildDirDelimiter, :dot, :cc2j_filename # String
|
24
24
|
attr_reader :include_filter, :exclude_filter, :adapt # String List
|
25
25
|
attr_reader :conversion_info, :stopOnFirstError, :clean, :rebuild, :show_includes, :show_includes_and_defines, :projectPaths, :qac, :dry, :syncedOutput, :debug_threads, :skipBuildingLine # Boolean
|
26
|
-
attr_reader :linkOnly, :compileOnly, :no_autodir, :clobber, :docu, :debug, :prepro, :oldLinkOrder, :prebuild, :printTime, :json, :wparse, :caseSensitivityCheck # Boolean
|
26
|
+
attr_reader :linkOnly, :compileOnly, :no_autodir, :clobber, :docu, :debug, :prepro, :oldLinkOrder, :prebuild, :printTime, :json, :wparse, :caseSensitivityCheck, :fileCmd, :mergeInc # Boolean
|
27
27
|
attr_reader :threads, :socket # Fixnum
|
28
28
|
attr_reader :vars, :include_filter_args # map
|
29
29
|
attr_reader :verbose
|
@@ -88,6 +88,8 @@ module Bake
|
|
88
88
|
@syncedOutput = false
|
89
89
|
@diabCaseCheck = false
|
90
90
|
@defines = []
|
91
|
+
@fileCmd = false
|
92
|
+
@mergeInc = false
|
91
93
|
|
92
94
|
add_option(["-b", "" ], lambda { |x| set_build_config(x) })
|
93
95
|
add_option(["-m" ], lambda { |x| @main_dir = x })
|
@@ -121,7 +123,8 @@ module Bake
|
|
121
123
|
add_option(["--set" ], lambda { |x| set_set(x) })
|
122
124
|
add_option(["-nb" ], lambda { @skipBuildingLine = true })
|
123
125
|
add_option(["--no-case-check" ], lambda { @caseSensitivityCheck = false })
|
124
|
-
|
126
|
+
add_option(["--file-cmd" ], lambda { @fileCmd = true })
|
127
|
+
add_option(["--merge-inc" ], lambda { @mergeInc = true })
|
125
128
|
add_option(["--clobber" ], lambda { @clobber = true; @clean = true })
|
126
129
|
add_option(["--ignore-cache", "--ignore_cache" ], lambda { @nocache = true })
|
127
130
|
add_option(["-j", "--threads" ], lambda { |x, dummy1, dummy2| set_threads(x) })
|
data/lib/bake/options/usage.rb
CHANGED
@@ -61,6 +61,8 @@ module Bake
|
|
61
61
|
puts " --nb Suppresses the lines \"**** Building x of y: name (config) ****"
|
62
62
|
puts " --crc32 <string> Calulates the CRC32 of string (0x4C11DB7, init 0, final xor 0, input and result not reflected), used for Uid variable calculation"
|
63
63
|
puts " --diab-case-check When compiling with DCC, this switches to the case check on Windows machines. No actual compilation is done."
|
64
|
+
puts " --file-cmd Writes arguments into a file and hands it over the compiler/archiver/linker. Works only for supported compilers."
|
65
|
+
puts " --merge-inc Merges includes together, so the compiler gets only one include directory."
|
64
66
|
puts " --link-2-17 DEPRECATED: Using link order of libraries which was used until bake 2.17"
|
65
67
|
puts " --build_ DEPRECATED: build directories will be build_<name> instead of build/<name>"
|
66
68
|
puts " --version Print version."
|
data/lib/bake/toolchain/diab.rb
CHANGED
@@ -17,7 +17,8 @@ module Bake
|
|
17
17
|
:COMPILE_FLAGS => "-c",
|
18
18
|
:DEP_FLAGS => "-Xmake-dependency=5 -Xmake-dependency-savefile=",
|
19
19
|
:DEP_FLAGS_SPACE => false,
|
20
|
-
:PREPRO_FLAGS => "-P"
|
20
|
+
:PREPRO_FLAGS => "-P",
|
21
|
+
:FILE_COMMAND => "@"
|
21
22
|
})
|
22
23
|
|
23
24
|
DiabChain[:COMPILER][:CPP] = Utils.deep_copy(DiabChain[:COMPILER][:C])
|
@@ -32,7 +33,8 @@ module Bake
|
|
32
33
|
|
33
34
|
DiabChain[:ARCHIVER][:COMMAND] = "dar"
|
34
35
|
DiabChain[:ARCHIVER][:ARCHIVE_FLAGS] = "-rc"
|
35
|
-
|
36
|
+
DiabChain[:ARCHIVER][:FILE_COMMAND] = "@"
|
37
|
+
|
36
38
|
DiabChain[:LINKER][:COMMAND] = "dcc"
|
37
39
|
DiabChain[:LINKER][:SCRIPT] = "-Wm"
|
38
40
|
DiabChain[:LINKER][:USER_LIB_FLAG] = "-l:"
|
@@ -41,6 +43,7 @@ module Bake
|
|
41
43
|
DiabChain[:LINKER][:LIB_PATH_FLAG] = "-L"
|
42
44
|
DiabChain[:LINKER][:MAP_FILE_FLAG] = "-Wl,-m6" # no map file if this string is empty, otherwise -Wl,-m6>abc.map
|
43
45
|
DiabChain[:LINKER][:OUTPUT_ENDING] = ".elf"
|
46
|
+
DiabChain[:LINKER][:FILE_COMMAND] = "@"
|
44
47
|
|
45
48
|
diabCompilerErrorParser = DiabCompilerErrorParser.new
|
46
49
|
DiabChain[:COMPILER][:C][:ERROR_PARSER] = diabCompilerErrorParser
|
data/lib/bake/toolchain/gcc.rb
CHANGED
@@ -34,7 +34,9 @@ module Bake
|
|
34
34
|
:COMPILE_FLAGS => "-c ",
|
35
35
|
:DEP_FLAGS => "-MD -MF",
|
36
36
|
:DEP_FLAGS_SPACE => true,
|
37
|
-
:PREPRO_FLAGS => "-E -P"
|
37
|
+
:PREPRO_FLAGS => "-E -P",
|
38
|
+
:FILE_COMMAND => "@",
|
39
|
+
:CUDA_PREFIX => "-Xcompiler"
|
38
40
|
})
|
39
41
|
|
40
42
|
GCCChain[:COMPILER][:C] = Utils.deep_copy(GCCChain[:COMPILER][:CPP])
|
@@ -47,10 +49,12 @@ module Bake
|
|
47
49
|
|
48
50
|
GCCChain[:ARCHIVER][:COMMAND] = "ar"
|
49
51
|
GCCChain[:ARCHIVER][:ARCHIVE_FLAGS] = "-rc"
|
50
|
-
|
52
|
+
GCCChain[:ARCHIVER][:FILE_COMMAND] = "@"
|
53
|
+
|
51
54
|
GCCChain[:LINKER][:COMMAND] = "g++"
|
52
55
|
GCCChain[:LINKER][:SCRIPT] = "-T"
|
53
56
|
GCCChain[:LINKER][:SCRIPT_SPACE] = (Bake::Utils::OS.name == "Mac" ? false : true)
|
57
|
+
GCCChain[:LINKER][:FILE_COMMAND] = "@"
|
54
58
|
|
55
59
|
GCCChain[:LINKER][:USER_LIB_FLAG] = "-l:"
|
56
60
|
GCCChain[:LINKER][:EXE_FLAG] = "-o"
|
@@ -29,9 +29,11 @@ module Bake
|
|
29
29
|
:DEP_FLAGS => "",
|
30
30
|
:DEP_FLAGS_SPACE => false,
|
31
31
|
:DEP_FLAGS_FILENAME => true,
|
32
|
+
:CUDA_PREFIX => "",
|
32
33
|
:ERROR_PARSER => nil,
|
33
34
|
:PREPRO_FLAGS => "",
|
34
|
-
:PREPRO_FILE_FLAG => nil
|
35
|
+
:PREPRO_FILE_FLAG => nil,
|
36
|
+
:FILE_COMMAND => ""
|
35
37
|
},
|
36
38
|
:C => {
|
37
39
|
:COMMAND => "",
|
@@ -49,9 +51,11 @@ module Bake
|
|
49
51
|
:DEP_FLAGS => "",
|
50
52
|
:DEP_FLAGS_SPACE => false,
|
51
53
|
:DEP_FLAGS_FILENAME => true,
|
54
|
+
:CUDA_PREFIX => "",
|
52
55
|
:ERROR_PARSER => nil,
|
53
56
|
:PREPRO_FLAGS => "",
|
54
|
-
:PREPRO_FILE_FLAG => nil
|
57
|
+
:PREPRO_FILE_FLAG => nil,
|
58
|
+
:FILE_COMMAND => ""
|
55
59
|
},
|
56
60
|
:ASM => {
|
57
61
|
:COMMAND => "",
|
@@ -69,9 +73,11 @@ module Bake
|
|
69
73
|
:DEP_FLAGS => "",
|
70
74
|
:DEP_FLAGS_SPACE => false,
|
71
75
|
:DEP_FLAGS_FILENAME => true,
|
76
|
+
:CUDA_PREFIX => "",
|
72
77
|
:ERROR_PARSER => nil,
|
73
78
|
:PREPRO_FLAGS => "",
|
74
|
-
:PREPRO_FILE_FLAG => nil
|
79
|
+
:PREPRO_FILE_FLAG => nil,
|
80
|
+
:FILE_COMMAND => ""
|
75
81
|
},
|
76
82
|
:DEP_FILE_SINGLE_LINE => :multi
|
77
83
|
},
|
@@ -83,7 +89,8 @@ module Bake
|
|
83
89
|
:ARCHIVE_FLAGS => "",
|
84
90
|
:ARCHIVE_FLAGS_SPACE => true,
|
85
91
|
:FLAGS => "",
|
86
|
-
:ERROR_PARSER => nil
|
92
|
+
:ERROR_PARSER => nil,
|
93
|
+
:FILE_COMMAND => ""
|
87
94
|
},
|
88
95
|
|
89
96
|
:LINKER =>
|
@@ -105,7 +112,8 @@ module Bake
|
|
105
112
|
:MAP_FILE_PIPE => true,
|
106
113
|
:OUTPUT_ENDING => "", # if empty, .exe is used on Windows, otherwise no ending
|
107
114
|
:ERROR_PARSER => nil,
|
108
|
-
:LIST_MODE => false
|
115
|
+
:LIST_MODE => false,
|
116
|
+
:FILE_COMMAND => ""
|
109
117
|
},
|
110
118
|
|
111
119
|
:MAKE =>
|
data/lib/bake/util.rb
CHANGED
@@ -79,6 +79,9 @@ def integrateCompiler(tcs, compiler, type)
|
|
79
79
|
if compiler.respond_to?("command") && compiler.command != ""
|
80
80
|
tcs[:COMPILER][type][:COMMAND] = compiler.command
|
81
81
|
end
|
82
|
+
if compiler.respond_to?("cuda") && compiler.command != ""
|
83
|
+
tcs[:COMPILER][type][:CUDA] = compiler.cuda
|
84
|
+
end
|
82
85
|
if compiler.respond_to?("prefix") && compiler.prefix != ""
|
83
86
|
tcs[:COMPILER][type][:PREFIX] = compiler.prefix
|
84
87
|
end
|
data/lib/blocks/blockBase.rb
CHANGED
@@ -189,6 +189,20 @@ module Bake
|
|
189
189
|
end
|
190
190
|
return true
|
191
191
|
end
|
192
|
+
|
193
|
+
def calcFileCmd(cmd, onlyCmd, orgOut, tcs, postfix = "")
|
194
|
+
if tcs[:FILE_COMMAND] == ""
|
195
|
+
Bake.formatter.printWarning("Warning: file command option not yet supported for this toolchain")
|
196
|
+
return cmd
|
197
|
+
end
|
198
|
+
args = cmd.drop(onlyCmd.length)
|
199
|
+
argsFlat = args.join(' ')
|
200
|
+
cmdFile = orgOut + ".file" + postfix
|
201
|
+
cmdFileLong = File.expand_path(cmdFile, @projectDir)
|
202
|
+
FileUtils.mkdir_p(File.dirname(cmdFileLong))
|
203
|
+
File.open(cmdFileLong, "w") { |f| f.puts argsFlat }
|
204
|
+
return onlyCmd + ["#{tcs[:FILE_COMMAND]}#{cmdFile}"]
|
205
|
+
end
|
192
206
|
|
193
207
|
end
|
194
208
|
end
|
data/lib/blocks/compile.rb
CHANGED
@@ -197,24 +197,35 @@ module Bake
|
|
197
197
|
|
198
198
|
cmd = Utils.flagSplit(compiler[:PREFIX], true)
|
199
199
|
cmd += Utils.flagSplit(compiler[:COMMAND], true)
|
200
|
+
onlyCmd = cmd
|
200
201
|
cmd += compiler[:COMPILE_FLAGS].split(" ")
|
201
202
|
|
202
203
|
if dep_filename
|
203
|
-
|
204
|
-
if
|
205
|
-
if
|
206
|
-
|
204
|
+
cmdDep = compiler[:DEP_FLAGS].split(" ")
|
205
|
+
if compiler[:DEP_FLAGS_FILENAME]
|
206
|
+
if compiler[:DEP_FLAGS_SPACE]
|
207
|
+
cmdDep << dep_filename
|
207
208
|
else
|
208
209
|
if dep_filename.include?" "
|
209
|
-
|
210
|
+
cmdDep[cmdDep.length-1] << "\"" + dep_filename + "\""
|
210
211
|
else
|
211
|
-
|
212
|
+
cmdDep[cmdDep.length-1] << dep_filename
|
212
213
|
end
|
213
|
-
|
214
214
|
end
|
215
215
|
end
|
216
|
+
if compiler[:CUDA]
|
217
|
+
if compiler[:CUDA_PREFIX] == ""
|
218
|
+
Bake.formatter.printWarning("Warning: Cuda not yet supported by this toolchain.")
|
219
|
+
else
|
220
|
+
cmdDep.each do |c|
|
221
|
+
cmd += [compiler[:CUDA_PREFIX], c]
|
222
|
+
end
|
223
|
+
cmdDep = nil
|
224
|
+
end
|
225
|
+
end
|
226
|
+
cmd += cmdDep if cmdDep
|
216
227
|
end
|
217
|
-
|
228
|
+
|
218
229
|
cmd += compiler[:PREPRO_FLAGS].split(" ") if Bake.options.prepro
|
219
230
|
cmd += flags
|
220
231
|
cmd += includes
|
@@ -248,7 +259,8 @@ module Bake
|
|
248
259
|
if not (cmdLineCheck and BlockBase.isCmdLineEqual?(cmd, cmdLineFile))
|
249
260
|
BlockBase.prepareOutput(File.expand_path(object,@projectDir))
|
250
261
|
outputType = Bake.options.analyze ? "Analyzing" : (Bake.options.prepro ? "Preprocessing" : "Compiling")
|
251
|
-
|
262
|
+
realCmd = Bake.options.fileCmd ? calcFileCmd(cmd, onlyCmd, object, compiler) : cmd
|
263
|
+
printCmd(realCmd, "#{outputType} #{@projectName} (#{@config.name}): #{source}", reason, false)
|
252
264
|
SyncOut.flushOutput()
|
253
265
|
BlockBase.writeCmdLineFile(cmd, cmdLineFile)
|
254
266
|
|
@@ -256,8 +268,8 @@ module Bake
|
|
256
268
|
consoleOutput = ""
|
257
269
|
incList = nil
|
258
270
|
if !Bake.options.diabCaseCheck
|
259
|
-
success, consoleOutput = ProcessHelper.run(
|
260
|
-
incList = process_result(
|
271
|
+
success, consoleOutput = ProcessHelper.run(realCmd, false, false, nil, [0], @projectDir) if !Bake.options.dry
|
272
|
+
incList = process_result(realCmd, consoleOutput, compiler[:ERROR_PARSER], nil, reason, success)
|
261
273
|
end
|
262
274
|
|
263
275
|
if type != :ASM and not Bake.options.analyze and not Bake.options.prepro
|
@@ -275,6 +287,7 @@ module Bake
|
|
275
287
|
if Bake.options.diabCaseCheck
|
276
288
|
pos = cmd.find_index(compiler[:OBJECT_FILE_FLAG])
|
277
289
|
preProCmd = (cmd[0..pos-1] + cmd[pos+2..-1] + ["-E"])
|
290
|
+
preProCmd = calcFileCmd(preProCmd, onlyCmd, object, compiler, ".dccCaseCheck") if Bake.options.fileCmd
|
278
291
|
success, consoleOutput = ProcessHelper.run(preProCmd, false, false, nil, [0], @projectDir)
|
279
292
|
if !success
|
280
293
|
Bake.formatter.printError("Error: could not compile #{source}")
|
@@ -400,6 +413,7 @@ module Bake
|
|
400
413
|
SyncOut.mutex.synchronize do
|
401
414
|
calcSources
|
402
415
|
calcObjects
|
416
|
+
prepareIncludes
|
403
417
|
end
|
404
418
|
|
405
419
|
fileListBlock = Set.new if Bake.options.filelist
|
@@ -637,6 +651,20 @@ module Bake
|
|
637
651
|
|
638
652
|
@include_list = @include_list.flatten.uniq
|
639
653
|
|
654
|
+
end
|
655
|
+
|
656
|
+
def prepareIncludes
|
657
|
+
if Bake.options.mergeInc
|
658
|
+
mdir = File.expand_path(@block.output_dir+"/mergedIncludes", @projectDir)
|
659
|
+
@include_list.each do |idir|
|
660
|
+
FileUtils.mkdir_p(mdir)
|
661
|
+
idir = idir.to_s
|
662
|
+
idir = File.expand_path(idir, @projectDir) if !File.is_absolute?(idir)
|
663
|
+
FileUtils.cp_r(Dir.glob(idir+"/*"), mdir)
|
664
|
+
end
|
665
|
+
@include_list = [@block.output_dir+"/mergedIncludes"]
|
666
|
+
end
|
667
|
+
|
640
668
|
@include_array = {}
|
641
669
|
[:CPP, :C, :ASM].each do |type|
|
642
670
|
@include_array[type] = @include_list.map do |k|
|
data/lib/blocks/executable.rb
CHANGED
@@ -118,10 +118,10 @@ module Bake
|
|
118
118
|
|
119
119
|
cmd = Utils.flagSplit(linker[:PREFIX], true)
|
120
120
|
cmd += Utils.flagSplit(linker[:COMMAND], true) # g++
|
121
|
+
onlyCmd = cmd
|
122
|
+
|
121
123
|
cmd += linker[:MUST_FLAGS].split(" ")
|
122
124
|
cmd += Bake::Utils::flagSplit(linker[:FLAGS],true)
|
123
|
-
|
124
|
-
|
125
125
|
cmd << linker[:EXE_FLAG]
|
126
126
|
if linker[:EXE_FLAG_SPACE]
|
127
127
|
cmd << @exe_name
|
@@ -148,11 +148,17 @@ module Bake
|
|
148
148
|
|
149
149
|
mapfileStr = (@mapfile and linker[:MAP_FILE_PIPE]) ? " >#{@mapfile}" : ""
|
150
150
|
|
151
|
+
realCmd = Bake.options.fileCmd ? calcFileCmd(cmd, onlyCmd, @exe_name, linker) : cmd
|
152
|
+
|
151
153
|
# pre print because linking can take much time
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
154
|
+
if Bake.options.fileCmd
|
155
|
+
cmdLinePrint = realCmd
|
156
|
+
else
|
157
|
+
cmdLinePrint = cmd.dup
|
158
|
+
outPipe = (@mapfile and linker[:MAP_FILE_PIPE]) ? "#{@mapfile}" : nil
|
159
|
+
cmdLinePrint << "> #{outPipe}" if outPipe
|
160
|
+
end
|
161
|
+
|
156
162
|
if cmdLineCheck and BlockBase.isCmdLineEqual?(cmd, cmdLineFile)
|
157
163
|
success = true
|
158
164
|
else
|
@@ -164,7 +170,7 @@ module Bake
|
|
164
170
|
BlockBase.writeCmdLineFile(cmd, cmdLineFile)
|
165
171
|
success = true
|
166
172
|
consoleOutput = ""
|
167
|
-
success, consoleOutput = ProcessHelper.run(
|
173
|
+
success, consoleOutput = ProcessHelper.run(realCmd, false, false, outPipe) if !Bake.options.dry
|
168
174
|
process_result(cmdLinePrint, consoleOutput, linker[:ERROR_PARSER], nil, reason, success)
|
169
175
|
|
170
176
|
check_config_file()
|
data/lib/blocks/library.rb
CHANGED
@@ -95,6 +95,7 @@ module Bake
|
|
95
95
|
|
96
96
|
cmd = Utils.flagSplit(archiver[:PREFIX], true)
|
97
97
|
cmd += Utils.flagSplit(archiver[:COMMAND], true) # ar
|
98
|
+
onlyCmd = cmd
|
98
99
|
cmd += Bake::Utils::flagSplit(archiver[:FLAGS],true) # --all_load
|
99
100
|
cmd += archiver[:ARCHIVE_FLAGS].split(" ")
|
100
101
|
|
@@ -117,11 +118,12 @@ module Bake
|
|
117
118
|
BlockBase.writeCmdLineFile(cmd, cmdLineFile)
|
118
119
|
consoleOutput = ""
|
119
120
|
|
120
|
-
|
121
|
+
realCmd = Bake.options.fileCmd ? calcFileCmd(cmd, onlyCmd, @archive_name, archiver) : cmd
|
122
|
+
printCmd(realCmd, "Creating #{@projectName} (#{@config.name}): #{@archive_name}", reason, false)
|
121
123
|
SyncOut.flushOutput()
|
122
124
|
|
123
|
-
success, consoleOutput = ProcessHelper.run(
|
124
|
-
process_result(
|
125
|
+
success, consoleOutput = ProcessHelper.run(realCmd, false, false, nil, [0], @projectDir) if !Bake.options.dry
|
126
|
+
process_result(realCmd, consoleOutput, archiver[:ERROR_PARSER], nil, reason, success)
|
125
127
|
|
126
128
|
check_config_file()
|
127
129
|
ensure
|
data/lib/common/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bake-toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.50.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Schaal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rtext
|