Skip to content

[BuildBot] Add --cmake-opts option to configure.py script #1430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion buildbot/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
import sys
import platform

# TODO:
# 1. Add support for relative paths (e.g. relative path to source directory)
# 2. Create obj_dir from the script if it doesn't exist

def do_configure(args):
ret = False

Expand Down Expand Up @@ -68,6 +72,7 @@ def do_configure(args):
"-DLLVM_ENABLE_SPHINX={}".format(llvm_enable_sphinx),
"-DBUILD_SHARED_LIBS={}".format(llvm_build_shared_libs),
"-DSYCL_ENABLE_XPTI_TRACING=ON", # Explicitly turn on XPTI tracing
"{}".format(args.cmake_opts),
llvm_dir
]

Expand All @@ -91,7 +96,7 @@ def do_configure(args):

def main():
parser = argparse.ArgumentParser(prog="configure.py",
description="script to do configure",
description="Generate build files from CMake configuration files",
formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument("-n", "--build-number", metavar="BUILD_NUM", help="build number")
parser.add_argument("-b", "--branch", metavar="BRANCH", help="pull request branch")
Expand All @@ -108,6 +113,7 @@ def main():
parser.add_argument("--docs", action='store_true', help="build Doxygen documentation")
parser.add_argument("--no-ocl", action='store_true', help="download OpenCL deps via CMake")
parser.add_argument("--shared-libs", action='store_true', help="Build shared libraries")
parser.add_argument("--cmake-opts", metavar="CMAKE_OPTS", help="Additional CMake options not configured via script parameters")

args = parser.parse_args()

Expand Down
9 changes: 5 additions & 4 deletions sycl/doc/GetStartedGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ cd %DPCPP_HOME%\build

## Build DPC++ toolchain

The easiest way to get started is to use the buildbot [configure](../../buildbot/configure.py)
and [compile](../../buildbot/configure.py) scripts.
The easiest way to get started is to use the buildbot
[configure](../../buildbot/configure.py) and
[compile](../../buildbot/compile.py) scripts.

In case you want to configure CMake manually the up-to-date reference for variables is in these files.
In case you want to configure CMake manually the up-to-date reference for
variables is in these files.

**Linux**

Expand All @@ -96,7 +98,6 @@ You can use the following flags with `configure.py`:
* `--shared-libs` -> Build shared libraries
* `-t` -> Build type (debug or release)


Ahead-of-time compilation for the Intel® processors is enabled by default.
For more, see [opencl-aot documentation](../../opencl-aot/README.md).

Expand Down