Switch GCMole to use GYP build file instead of SCons.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/14320024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 0af76e96
...@@ -117,31 +117,25 @@ function InvokeClangPluginForEachFile(filenames, cfg, func) ...@@ -117,31 +117,25 @@ function InvokeClangPluginForEachFile(filenames, cfg, func)
end end
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- SConscript parsing -- GYP file parsing
local function ParseSConscript() local function ParseGYPFile()
local f = assert(io.open("src/SConscript"), "failed to open SConscript") local f = assert(io.open("tools/gyp/v8.gyp"), "failed to open GYP file")
local sconscript = f:read('*a') local gyp = f:read('*a')
f:close() f:close()
local SOURCES = sconscript:match "SOURCES = {(.-)}"; local result = {}
local sources = {} for condition, sources in
gyp:gmatch "'sources': %[.-### gcmole%((.-)%) ###(.-)%]" do
for condition, list in
SOURCES:gmatch "'([^']-)': Split%(\"\"\"(.-)\"\"\"%)" do
local files = {} local files = {}
for file in list:gmatch "[^%s]+" do table.insert(files, file) end for file in sources:gmatch "'%.%./%.%./src/([^']-%.cc)'" do
sources[condition] = files table.insert(files, file)
end end
result[condition] = files
for condition, list in SOURCES:gmatch "'([^']-)': %[(.-)%]" do
local files = {}
for file in list:gmatch "'([^']-)'" do table.insert(files, file) end
sources[condition] = files
end end
return sources return result
end end
local function EvaluateCondition(cond, props) local function EvaluateCondition(cond, props)
...@@ -165,7 +159,7 @@ local function BuildFileList(sources, props) ...@@ -165,7 +159,7 @@ local function BuildFileList(sources, props)
return list return list
end end
local sources = ParseSConscript() local sources = ParseGYPFile()
local function FilesForArch(arch) local function FilesForArch(arch)
return BuildFileList(sources, { os = 'linux', return BuildFileList(sources, { os = 'linux',
......
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
'include_dirs+': [ 'include_dirs+': [
'../../src', '../../src',
], ],
'sources': [ 'sources': [ ### gcmole(all) ###
'../../src/accessors.cc', '../../src/accessors.cc',
'../../src/accessors.h', '../../src/accessors.h',
'../../src/allocation.cc', '../../src/allocation.cc',
...@@ -491,7 +491,7 @@ ...@@ -491,7 +491,7 @@
'toolsets': ['target'], 'toolsets': ['target'],
}], }],
['v8_target_arch=="arm"', { ['v8_target_arch=="arm"', {
'sources': [ 'sources': [ ### gcmole(arch:arm) ###
'../../src/arm/assembler-arm-inl.h', '../../src/arm/assembler-arm-inl.h',
'../../src/arm/assembler-arm.cc', '../../src/arm/assembler-arm.cc',
'../../src/arm/assembler-arm.h', '../../src/arm/assembler-arm.h',
...@@ -525,7 +525,7 @@ ...@@ -525,7 +525,7 @@
], ],
}], }],
['v8_target_arch=="ia32" or v8_target_arch=="mac" or OS=="mac"', { ['v8_target_arch=="ia32" or v8_target_arch=="mac" or OS=="mac"', {
'sources': [ 'sources': [ ### gcmole(arch:ia32) ###
'../../src/ia32/assembler-ia32-inl.h', '../../src/ia32/assembler-ia32-inl.h',
'../../src/ia32/assembler-ia32.cc', '../../src/ia32/assembler-ia32.cc',
'../../src/ia32/assembler-ia32.h', '../../src/ia32/assembler-ia32.h',
...@@ -556,7 +556,7 @@ ...@@ -556,7 +556,7 @@
], ],
}], }],
['v8_target_arch=="mipsel"', { ['v8_target_arch=="mipsel"', {
'sources': [ 'sources': [ ### gcmole(arch:mipsel) ###
'../../src/mips/assembler-mips.cc', '../../src/mips/assembler-mips.cc',
'../../src/mips/assembler-mips.h', '../../src/mips/assembler-mips.h',
'../../src/mips/assembler-mips-inl.h', '../../src/mips/assembler-mips-inl.h',
...@@ -590,7 +590,7 @@ ...@@ -590,7 +590,7 @@
], ],
}], }],
['v8_target_arch=="x64" or v8_target_arch=="mac" or OS=="mac"', { ['v8_target_arch=="x64" or v8_target_arch=="mac" or OS=="mac"', {
'sources': [ 'sources': [ ### gcmole(arch:x64) ###
'../../src/x64/assembler-x64-inl.h', '../../src/x64/assembler-x64-inl.h',
'../../src/x64/assembler-x64.cc', '../../src/x64/assembler-x64.cc',
'../../src/x64/assembler-x64.h', '../../src/x64/assembler-x64.h',
...@@ -630,7 +630,7 @@ ...@@ -630,7 +630,7 @@
}], }],
], ],
}, },
'sources': [ 'sources': [ ### gcmole(os:linux) ###
'../../src/platform-linux.cc', '../../src/platform-linux.cc',
'../../src/platform-posix.cc' '../../src/platform-posix.cc'
], ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment