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)
end
-------------------------------------------------------------------------------
-- SConscript parsing
-- GYP file parsing
local function ParseSConscript()
local f = assert(io.open("src/SConscript"), "failed to open SConscript")
local sconscript = f:read('*a')
local function ParseGYPFile()
local f = assert(io.open("tools/gyp/v8.gyp"), "failed to open GYP file")
local gyp = f:read('*a')
f:close()
local SOURCES = sconscript:match "SOURCES = {(.-)}";
local result = {}
local sources = {}
for condition, list in
SOURCES:gmatch "'([^']-)': Split%(\"\"\"(.-)\"\"\"%)" do
for condition, sources in
gyp:gmatch "'sources': %[.-### gcmole%((.-)%) ###(.-)%]" do
local files = {}
for file in list:gmatch "[^%s]+" do table.insert(files, file) end
sources[condition] = files
end
for condition, list in SOURCES:gmatch "'([^']-)': %[(.-)%]" do
local files = {}
for file in list:gmatch "'([^']-)'" do table.insert(files, file) end
sources[condition] = files
for file in sources:gmatch "'%.%./%.%./src/([^']-%.cc)'" do
table.insert(files, file)
end
result[condition] = files
end
return sources
return result
end
local function EvaluateCondition(cond, props)
......@@ -165,7 +159,7 @@ local function BuildFileList(sources, props)
return list
end
local sources = ParseSConscript()
local sources = ParseGYPFile()
local function FilesForArch(arch)
return BuildFileList(sources, { os = 'linux',
......
......@@ -202,7 +202,7 @@
'include_dirs+': [
'../../src',
],
'sources': [
'sources': [ ### gcmole(all) ###
'../../src/accessors.cc',
'../../src/accessors.h',
'../../src/allocation.cc',
......@@ -491,7 +491,7 @@
'toolsets': ['target'],
}],
['v8_target_arch=="arm"', {
'sources': [
'sources': [ ### gcmole(arch:arm) ###
'../../src/arm/assembler-arm-inl.h',
'../../src/arm/assembler-arm.cc',
'../../src/arm/assembler-arm.h',
......@@ -525,7 +525,7 @@
],
}],
['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.cc',
'../../src/ia32/assembler-ia32.h',
......@@ -556,7 +556,7 @@
],
}],
['v8_target_arch=="mipsel"', {
'sources': [
'sources': [ ### gcmole(arch:mipsel) ###
'../../src/mips/assembler-mips.cc',
'../../src/mips/assembler-mips.h',
'../../src/mips/assembler-mips-inl.h',
......@@ -590,7 +590,7 @@
],
}],
['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.cc',
'../../src/x64/assembler-x64.h',
......@@ -630,7 +630,7 @@
}],
],
},
'sources': [
'sources': [ ### gcmole(os:linux) ###
'../../src/platform-linux.cc',
'../../src/platform-posix.cc'
],
......@@ -924,7 +924,7 @@
],
},
],
}, { # use_system_v8 != 0
}, { # use_system_v8 != 0
'targets': [
{
'target_name': 'v8',
......
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