| 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.')
|
|
|