예제 #1
0
def build_cmake(options = '', subdir = ''):
    build_dir = _add_subpath(_info.build_dir, subdir)
    cmake_dir = path.join(build_dir, 'cmake.build')
    options = _build_cmake_args() + options.split()

    fsutil.make_dir(cmake_dir)

    cmdutil.native_exec('cmake', options, work_dir=cmake_dir)
    cmdutil.native_make([], work_dir=cmake_dir)
    cmdutil.native_make(['install'], work_dir=cmake_dir)
예제 #2
0
def _postprocess(files, do_strip, do_extract_dbg):
    if not (do_strip or do_extract_dbg):
        return
    strip = toolchain.tool_name('strip')
    objcopy = toolchain.tool_name('objcopy')
    result = []
    for target in files:
        dbgfile = target + ".debug"
        if do_extract_dbg:
            cmdutil.native_exec(objcopy, ['--only-keep-debug', target, dbgfile])
            result.append(dbgfile)
        if do_strip:
            cmdutil.native_exec(strip, ['--strip-all', target])
        if do_extract_dbg:
            cmdutil.native_exec(objcopy, ['--add-gnu-debuglink=' + dbgfile, target])
    return result