bake-toolkit 2.34.0 → 2.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/bakery +1 -0
- data/lib/bake/options/options.rb +3 -1
- data/lib/bake/options/usage.rb +1 -0
- data/lib/blocks/block.rb +21 -5
- data/lib/common/version.rb +1 -1
- data/lib/tocxx.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b11e2453cd82049d2070eb49b22ecb28d8048bde
|
|
4
|
+
data.tar.gz: f10d2cd9bfeca29b371f7c9ee20fad0147390410
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0bb5910da86ad9840662d921af520b44cb7b63b14c265ab3e3cf9e2ba3d800f23dc888fdffaea3fea7db4f6f482a088bede87ec5a968713c2eecf5825564a60
|
|
7
|
+
data.tar.gz: bbb83467b457996c83a751383f90bae049cdba3d60c9a60258457a06a62b04bc20783ccb7c35c13b1f9eb790b9609f97aabe2f20a252cb592a5e6a9d0b6a8486
|
data/bin/bakery
CHANGED
data/lib/bake/options/options.rb
CHANGED
|
@@ -20,7 +20,7 @@ module Bake
|
|
|
20
20
|
attr_accessor :build_config, :nocache, :analyze, :eclipseOrder, :envToolchain, :showConfigs
|
|
21
21
|
attr_reader :main_dir, :project, :filename, :main_project_name, :buildDirDelimiter, :dot, :cc2j_filename # String
|
|
22
22
|
attr_reader :roots, :include_filter, :exclude_filter, :adapt # String List
|
|
23
|
-
attr_reader :conversion_info, :stopOnFirstError, :clean, :rebuild, :show_includes, :show_includes_and_defines, :projectPaths, :qac, :dry, :syncedOutput # Boolean
|
|
23
|
+
attr_reader :conversion_info, :stopOnFirstError, :clean, :rebuild, :show_includes, :show_includes_and_defines, :projectPaths, :qac, :dry, :syncedOutput, :debug_threads # Boolean
|
|
24
24
|
attr_reader :linkOnly, :compileOnly, :no_autodir, :clobber, :docu, :debug, :prepro, :oldLinkOrder, :prebuild, :printTime, :json, :wparse # Boolean
|
|
25
25
|
attr_reader :threads, :socket # Fixnum
|
|
26
26
|
attr_reader :vars # map
|
|
@@ -32,6 +32,7 @@ module Bake
|
|
|
32
32
|
def initialize(argv)
|
|
33
33
|
super(argv)
|
|
34
34
|
|
|
35
|
+
@debug_threads = false
|
|
35
36
|
@dry = false
|
|
36
37
|
@filelist = nil
|
|
37
38
|
@qac = false
|
|
@@ -111,6 +112,7 @@ module Bake
|
|
|
111
112
|
add_option(["-v3" ], lambda { @verbose = 3 })
|
|
112
113
|
|
|
113
114
|
add_option(["--debug" ], lambda { @debug = true })
|
|
115
|
+
add_option(["--debug-threads" ], lambda { @debug_threads = true })
|
|
114
116
|
add_option(["--set" ], lambda { |x| set_set(x) })
|
|
115
117
|
|
|
116
118
|
add_option(["--clobber" ], lambda { @clobber = true; @clean = true })
|
data/lib/bake/options/usage.rb
CHANGED
|
@@ -66,6 +66,7 @@ module Bake
|
|
|
66
66
|
puts " -h, --help Print this help."
|
|
67
67
|
puts " --license Print the license."
|
|
68
68
|
puts " --debug Print out backtraces in some cases - used only for debugging bake."
|
|
69
|
+
puts " --debug-threads Print some debug information about started and stopped threads."
|
|
69
70
|
ExitHelper.exit(0)
|
|
70
71
|
end
|
|
71
72
|
|
data/lib/blocks/block.rb
CHANGED
|
@@ -184,6 +184,15 @@ module Bake
|
|
|
184
184
|
@@threads
|
|
185
185
|
end
|
|
186
186
|
|
|
187
|
+
def self.waitForAllThreads
|
|
188
|
+
if @@threads.length > 0
|
|
189
|
+
STDOUT.puts "DEBUG_THREADS: Wait for all threads." if Bake.options.debug_threads
|
|
190
|
+
ThreadsWait.all_waits(@@threads)
|
|
191
|
+
@@threads = []
|
|
192
|
+
STDOUT.puts "DEBUG_THREADS: All threads finished." if Bake.options.debug_threads
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
187
196
|
def calcIsBuildBlock
|
|
188
197
|
@startupSteps ||= []
|
|
189
198
|
|
|
@@ -277,8 +286,13 @@ module Bake
|
|
|
277
286
|
|
|
278
287
|
def self.waitForFreeThread
|
|
279
288
|
if @@threads.length == Bake.options.threads
|
|
280
|
-
|
|
281
|
-
|
|
289
|
+
begin
|
|
290
|
+
STDOUT.puts "DEBUG_THREADS: Wait for free thread." if Bake.options.debug_threads
|
|
291
|
+
endedThread = ThreadsWait.new(@@threads).next_wait
|
|
292
|
+
STDOUT.puts "DEBUG_THREADS: Thread free." if Bake.options.debug_threads
|
|
293
|
+
@@threads.delete(endedThread)
|
|
294
|
+
rescue ErrNoWaitingThread
|
|
295
|
+
end
|
|
282
296
|
end
|
|
283
297
|
end
|
|
284
298
|
|
|
@@ -289,6 +303,7 @@ module Bake
|
|
|
289
303
|
return if blockAbort?(true)
|
|
290
304
|
|
|
291
305
|
@@threads << Thread.new(Thread.current[:stdout], Thread.current[:errorStream]) { |outStr, errStr|
|
|
306
|
+
STDOUT.puts "DEBUG_THREADS: Started: #{Thread.current.object_id} (#{@projectName}, #{@config.name})" if Bake.options.debug_threads
|
|
292
307
|
Thread.current[:stdout] = outStr
|
|
293
308
|
Thread.current[:errorStream] = errStr
|
|
294
309
|
exceptionOccured = false
|
|
@@ -309,6 +324,7 @@ module Bake
|
|
|
309
324
|
@result = false
|
|
310
325
|
@@delayed_result = false
|
|
311
326
|
end
|
|
327
|
+
STDOUT.puts "DEBUG_THREADS: Stopped: #{Thread.current.object_id} (#{@projectName}, #{@config.name})" if Bake.options.debug_threads
|
|
312
328
|
}
|
|
313
329
|
|
|
314
330
|
Block::waitForFreeThread()
|
|
@@ -329,7 +345,7 @@ module Bake
|
|
|
329
345
|
Thread.current[:lastCommand] = nil
|
|
330
346
|
|
|
331
347
|
preSteps.each do |step|
|
|
332
|
-
|
|
348
|
+
Blocks::Block::waitForAllThreads()
|
|
333
349
|
@result = executeStep(step, method) if @result
|
|
334
350
|
return @result if blockAbort?(@result)
|
|
335
351
|
end unless @prebuild
|
|
@@ -361,14 +377,14 @@ module Bake
|
|
|
361
377
|
} if !threadableSteps.empty?
|
|
362
378
|
nonThreadableSteps.each do |step|
|
|
363
379
|
if !@prebuild || (Library === step)
|
|
364
|
-
|
|
380
|
+
Blocks::Block::waitForAllThreads()
|
|
365
381
|
@result = executeStep(step, method) if @result
|
|
366
382
|
end
|
|
367
383
|
return @result if blockAbort?(@result)
|
|
368
384
|
end
|
|
369
385
|
|
|
370
386
|
postSteps.each do |step|
|
|
371
|
-
|
|
387
|
+
Blocks::Block::waitForAllThreads()
|
|
372
388
|
@result = executeStep(step, method) if @result
|
|
373
389
|
return @result if blockAbort?(@result)
|
|
374
390
|
end unless @prebuild
|
data/lib/common/version.rb
CHANGED
data/lib/tocxx.rb
CHANGED
|
@@ -355,7 +355,7 @@ module Bake
|
|
|
355
355
|
SyncOut.reset_errors
|
|
356
356
|
result = callBlock(block, method) && result
|
|
357
357
|
ensure
|
|
358
|
-
|
|
358
|
+
Blocks::Block::waitForAllThreads()
|
|
359
359
|
result &&= Blocks::Block.delayed_result
|
|
360
360
|
SyncOut.stopStream(result)
|
|
361
361
|
end
|
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.34.
|
|
4
|
+
version: 2.34.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alexander Schaal
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-03-
|
|
11
|
+
date: 2017-03-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rtext
|