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

Unified Diff: native_client_sdk/src/tools/nacl_config.py

Issue 118553007: [NaCl SDK] Use nacl_config.py in common.mk build system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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
« no previous file with comments | « native_client_sdk/src/tools/getos.py ('k') | native_client_sdk/src/tools/nacl_gcc.mk » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/tools/nacl_config.py
diff --git a/native_client_sdk/src/tools/nacl_config.py b/native_client_sdk/src/tools/nacl_config.py
index 1a9b4697a9c1e02389cf372a2764c1a49254aff6..c09ef13add3413d4ee64f99963b271f9034285ad 100755
--- a/native_client_sdk/src/tools/nacl_config.py
+++ b/native_client_sdk/src/tools/nacl_config.py
@@ -191,9 +191,11 @@ def GetToolPath(toolchain, arch, tool):
'x86_64-nacl-gdb')
if toolchain == 'pnacl':
+ CheckValidToolchainArch(toolchain, arch)
tool = PNACL_TOOLS.get(tool, tool)
full_tool_name = 'pnacl-%s' % tool
else:
+ CheckValidToolchainArch(toolchain, arch, arch_required=True)
ExpectArch(arch, VALID_ARCHES)
tool = NACL_TOOLS.get(tool, tool)
full_tool_name = '%s-nacl-%s' % (GetArchName(arch), tool)
@@ -205,6 +207,11 @@ def GetCFlags(toolchain):
return ' '.join('-I%s' % dirname for dirname in GetSDKIncludeDirs(toolchain))
+def GetIncludeDirs(toolchain):
+ ExpectToolchain(toolchain, VALID_TOOLCHAINS)
+ return ' '.join(GetSDKIncludeDirs(toolchain))
+
+
def GetLDFlags():
return '-L%s' % GetSDKLibDir()
@@ -225,6 +232,9 @@ def main(args):
action='store_true')
group.add_option('--libs', '--ldflags', help='output all linker flags',
action='store_true')
+ group.add_option('--include-dirs',
+ help='output include dirs, separated by spaces',
+ action='store_true')
parser.add_option_group(group)
options, _ = parser.parse_args(args)
@@ -238,10 +248,11 @@ def main(args):
if options.cflags:
print GetCFlags(options.toolchain)
+ elif options.include_dirs:
+ print GetIncludeDirs(options.toolchain)
elif options.libs:
print GetLDFlags()
elif options.tool:
- CheckValidToolchainArch(options.toolchain, options.arch, True)
print GetToolPath(options.toolchain, options.arch, options.tool)
else:
parser.error('Expected a command. Run with --help for more information.')
« no previous file with comments | « native_client_sdk/src/tools/getos.py ('k') | native_client_sdk/src/tools/nacl_gcc.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698