Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: native_client_sdk/src/build_tools/make_rules.py

Issue 10824092: [NaCl SDK] Build gtest on buildbots, but don't include it in the SDK. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to HEAD Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/build_tools/make_rules.py
diff --git a/native_client_sdk/src/build_tools/make_rules.py b/native_client_sdk/src/build_tools/make_rules.py
index 7bf56315a4ff00df270c9d9ef5b370cb80d891f3..c3213529e300c262bf7dd9f279fcd2d1a9b370e1 100755
--- a/native_client_sdk/src/build_tools/make_rules.py
+++ b/native_client_sdk/src/build_tools/make_rules.py
@@ -56,20 +56,20 @@ NACL_CC_RULE = """
<OBJS>:=$(patsubst %.<ext>, <tc>/%_<ARCH>.o,$(<PROJ>_<EXT>))
DEPFILES+=$(<OBJS>:.o=.d)
$(<OBJS>) : <tc>/%_<ARCH>.o : %.<ext> $(THIS_MAKE) | <tc>
-<TAB>$(<CC>) -o $@ $< <MACH> $(<PROJ>_<EXT>FLAGS) -DTCNAME=<tc> $(<TC>_CCFLAGS) <DEFLIST>
+<TAB>$(<CC>) -o $@ $< <MACH> -DTCNAME=<tc> $(<TC>_CCFLAGS) $(<PROJ>_<EXT>FLAGS) <DEFLIST> <INCLUDELIST>
"""
SO_CC_RULE = """
<OBJS>:=$(patsubst %.<ext>, <tc>/%_<ARCH>.o,$(<PROJ>_<EXT>))
DEPFILES+=$(<OBJS>:.o=.d)
$(<OBJS>) : <tc>/%_<ARCH>.o : %.<ext> $(THIS_MAKE) | <tc>
-<TAB>$(<CC>) -o $@ $< <MACH> -fPIC $(<PROJ>_<EXT>FLAGS) -DTCNAME=<tc> $(<TC>_CCFLAGS) <DEFLIST>
+<TAB>$(<CC>) -o $@ $< <MACH> -fPIC -DTCNAME=<tc> $(<TC>_CCFLAGS) $(<PROJ>_<EXT>FLAGS) <DEFLIST> <INCLUDELIST>
"""
WIN_CC_RULE = """
<OBJS>:=$(patsubst %.<ext>, <tc>/%.obj,$(<PROJ>_<EXT>))
$(<OBJS>) : <tc>/%.obj : %.<ext> $(THIS_MAKE) | <tc>
-<TAB>$(<CC>) /Fo$@ /c $< -DTCNAME=host $(WIN_CCFLAGS) <DEFLIST>
+<TAB>$(<CC>) /Fo$@ /c $< -DTCNAME=host $(WIN_CCFLAGS) <DEFLIST> <INCLUDELIST>
"""
#
@@ -152,6 +152,7 @@ EXT_MAP = {
WIN_TOOL = {
'DEFINE': '-D%s',
+ 'INCLUDE': '/I%s',
'LIBRARY': '%s.lib',
'main': '<tc>/<proj>.dll',
'nmf': '<tc>/<proj>.nmf',
@@ -161,6 +162,7 @@ WIN_TOOL = {
NACL_TOOL = {
'DEFINE': '-D%s',
+ 'INCLUDE': '-I%s',
'LIBRARY': '-l%s',
'main': '<tc>/<proj>_<ARCH>.nexe',
'nmf': '<tc>/<proj>.nmf',
@@ -246,16 +248,21 @@ def GetBuildRule(tool, ext):
return BUILD_RULES[tool][ext]
+def BuildList(tool, key, items):
+ pattern = BUILD_RULES[tool]['TOOL'][key]
+ items = [(pattern % name) for name in items]
+ return ' '.join(items)
+
noelallen1 2012/07/31 20:37:21 Missing LF
def BuildDefineList(tool, defs):
- pattern = BUILD_RULES[tool]['TOOL']['DEFINE']
- defines = [(pattern % name) for name in defs]
- return ' '.join(defines)
+ return BuildList(tool, 'DEFINE', defs)
+
+
+def BuildIncludeList(tool, includes):
+ return BuildList(tool, 'INCLUDE', includes)
def BuildLibList(tool, libs):
- pattern = BUILD_RULES[tool]['TOOL']['LIBRARY']
- libraries = [(pattern % name) for name in libs]
- return ' '.join(libraries)
+ return BuildList(tool, 'LIBRARY', libs)
def BuildToolDict(toolchain, project, arch = {}, ext='nexe', **kwargs):
« no previous file with comments | « native_client_sdk/src/build_tools/generate_make.py ('k') | native_client_sdk/src/libraries/gtest/build.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698