Skip to content

Commit 909c470

Browse files
committed
Remove cmake-distinguishing references from names, comments
1 parent 79dafce commit 909c470

File tree

1 file changed

+29
-26
lines changed

1 file changed

+29
-26
lines changed

master/master.cfg

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ GITHUB_TOKEN = (SECRETS_DIR / "github_token.txt").read_text().strip()
5757
HALIDE_BB_PASS = (SECRETS_DIR / "halide_bb_pass.txt").read_text().strip()
5858
WEBHOOK_TOKEN = (SECRETS_DIR / "webhook_token.txt").read_text().strip()
5959

60+
6061
# LLVM
6162

6263
# At any given time, we test (at least) 3 LLVM versions:
@@ -226,7 +227,7 @@ performance_lock = WorkerLock("performance_lock", maxCount=9999)
226227
# When building the LLVM nightlies, we can sync & build LLVM independently
227228
# from other work, but when we update the install directory, we need to ensure
228229
# we have an exclusive lock across the entire worker. (Since we have a small
229-
# number of LLVM versions, and since 'make install' doesn't take very long,
230+
# number of LLVM versions, and since 'cmake --install' doesn't take very long,
230231
# we could probably just get by with a single lock for *any* llvm install,
231232
# but this isn't much harder to do.)
232233
llvm_build_locks = {}
@@ -300,9 +301,7 @@ class BuilderType:
300301
setup. (If we ever need to do so, compiler should be added to this.)
301302
"""
302303

303-
def __init__(
304-
self, arch, bits, os, halide_branch, llvm_branch, purpose, sanitizer=None
305-
):
304+
def __init__(self, arch, bits, os, halide_branch, llvm_branch, purpose, sanitizer=None):
306305
assert arch in ["arm", "x86"]
307306
assert bits in [32, 64]
308307
assert os in ["linux", "windows", "osx"]
@@ -655,7 +654,7 @@ def get_halide_cmake_options(builder_type, build_dir):
655654
return options
656655

657656

658-
def get_ctest_options(builder_type, build_dir):
657+
def get_ctest_options(builder_type):
659658
assert builder_type.purpose != Purpose.llvm_nightly
660659

661660
if builder_type.sanitizer:
@@ -669,7 +668,10 @@ def get_ctest_options(builder_type, build_dir):
669668
return {"build_config": "Release"}
670669

671670

672-
def get_halide_cmake_definitions(builder_type, halide_target="host", wasm_jit="wabt", extra_cmake_defs={}):
671+
def get_halide_cmake_definitions(builder_type, halide_target="host", wasm_jit="wabt", extra_cmake_defs=None):
672+
if extra_cmake_defs is None:
673+
extra_cmake_defs = {}
674+
673675
cmake_definitions = {
674676
"Clang_DIR": get_llvm_install_path(builder_type, "lib/cmake/clang"),
675677
"CMAKE_INSTALL_PREFIX": get_halide_install_path(builder_type),
@@ -728,14 +730,15 @@ def get_halide_cmake_definitions(builder_type, halide_target="host", wasm_jit="w
728730
return cmake_definitions
729731

730732

731-
def get_cmake_build_command(builder_type, build_dir, targets=None):
732-
cmd = ["ninja", "-C", build_dir, "-j", Property("WORKER_BUILD_PARALLELISM")]
733+
def get_build_command(builder_type, build_dir, targets=None):
734+
cmd = ["cmake", "--build", build_dir, "-j", Property("WORKER_BUILD_PARALLELISM")]
733735

734736
# TODO(srj): for debugging apps/c_backend
735737
if builder_type.os == "windows":
736-
cmd.append("-v")
738+
cmd.append("--verbose")
737739

738740
if targets:
741+
cmd.append("--target")
739742
cmd.extend(targets)
740743

741744
return cmd
@@ -1162,7 +1165,7 @@ def add_llvm_steps(factory, builder_type, clean_rebuild):
11621165
haltOnFailure=True,
11631166
workdir=build_dir,
11641167
env=Property("env"),
1165-
command=get_cmake_build_command(builder_type, build_dir, targets=["install"]),
1168+
command=get_build_command(builder_type, build_dir, targets=["install"]),
11661169
)
11671170
)
11681171

@@ -1291,7 +1294,7 @@ def add_llvm_steps(factory, builder_type, clean_rebuild):
12911294
)
12921295

12931296

1294-
def add_halide_cmake_build_steps(factory, builder_type):
1297+
def add_halide_build_steps(factory, builder_type):
12951298
# Always do a clean build for Halide
12961299
source_dir = get_halide_source_path()
12971300
build_dir = get_halide_build_path()
@@ -1354,12 +1357,12 @@ def add_halide_cmake_build_steps(factory, builder_type):
13541357
haltOnFailure=True,
13551358
workdir=build_dir,
13561359
env=Property("env"),
1357-
command=get_cmake_build_command(builder_type, build_dir, targets=["all", "install"]),
1360+
command=get_build_command(builder_type, build_dir, targets=["all", "install"]),
13581361
)
13591362
)
13601363

13611364

1362-
def add_halide_cmake_package_steps(factory, builder_type):
1365+
def add_halide_package_steps(factory, builder_type):
13631366
source_dir = get_halide_source_path()
13641367

13651368
target = builder_type.halide_target()
@@ -1591,7 +1594,7 @@ def short_target(halide_target):
15911594
return "<unknown>"
15921595

15931596

1594-
def add_halide_cmake_test_steps(factory, builder_type):
1597+
def add_halide_test_steps(factory, builder_type):
15951598
parallelism = Property("WORKER_BUILD_PARALLELISM")
15961599

15971600
labels = get_test_labels(builder_type)
@@ -1673,7 +1676,7 @@ def add_halide_cmake_test_steps(factory, builder_type):
16731676
haltOnFailure=True,
16741677
workdir=build_dir,
16751678
env=env,
1676-
command=get_cmake_build_command(builder_type, build_dir, targets=["all", "install"]),
1679+
command=get_build_command(builder_type, build_dir, targets=["all", "install"]),
16771680
)
16781681
)
16791682

@@ -1733,7 +1736,7 @@ def add_halide_cmake_test_steps(factory, builder_type):
17331736
labels=parallel_test_labels,
17341737
exclude_tests=exclude_tests,
17351738
jobs=parallelism,
1736-
**get_ctest_options(builder_type, build_dir),
1739+
**get_ctest_options(builder_type),
17371740
)
17381741
)
17391742

@@ -1750,7 +1753,7 @@ def add_halide_cmake_test_steps(factory, builder_type):
17501753
labels=exclusive_test_labels,
17511754
verbose=True,
17521755
extra_flags=["--repeat", "until-pass:5"],
1753-
**get_ctest_options(builder_type, build_dir),
1756+
**get_ctest_options(builder_type),
17541757
)
17551758
)
17561759

@@ -1793,7 +1796,7 @@ def add_halide_cmake_test_steps(factory, builder_type):
17931796
haltOnFailure=True,
17941797
workdir=apps_build_dir,
17951798
env=env,
1796-
command=get_cmake_build_command(builder_type, apps_build_dir),
1799+
command=get_build_command(builder_type, apps_build_dir),
17971800
)
17981801
)
17991802

@@ -1823,22 +1826,22 @@ def add_halide_cmake_test_steps(factory, builder_type):
18231826
exclude_labels=["slow_tests"],
18241827
verbose=True,
18251828
extra_flags=retry_flags,
1826-
**get_ctest_options(builder_type, apps_build_dir),
1829+
**get_ctest_options(builder_type),
18271830
)
18281831
)
18291832

18301833

1831-
def create_halide_cmake_factory(builder_type):
1834+
def create_halide_build_factory(builder_type):
18321835
factory = BuildFactory()
18331836
add_env_setup_step(factory, builder_type)
18341837
add_get_halide_source_steps(factory, builder_type)
18351838
add_create_venv_step(factory, builder_type)
1836-
add_halide_cmake_build_steps(factory, builder_type)
1837-
add_halide_cmake_test_steps(factory, builder_type)
1839+
add_halide_build_steps(factory, builder_type)
1840+
add_halide_test_steps(factory, builder_type)
18381841

18391842
# If everything else looks ok, build a distrib.
18401843
if builder_type.purpose == Purpose.halide_nightly:
1841-
add_halide_cmake_package_steps(factory, builder_type)
1844+
add_halide_package_steps(factory, builder_type)
18421845

18431846
return factory
18441847

@@ -1875,7 +1878,7 @@ def create_halide_builder(arch, bits, os, halide_branch, llvm_branch, purpose):
18751878
builder = BuilderConfig(
18761879
name=builder_type.builder_label(),
18771880
workernames=workers,
1878-
factory=create_halide_cmake_factory(builder_type),
1881+
factory=create_halide_build_factory(builder_type),
18791882
collapseRequests=True,
18801883
# We need counting access to our llvm branch during Halide builds.
18811884
# (We could probably get by with access during only a subset of
@@ -1974,7 +1977,7 @@ def create_halide_scheduler(halide_branch):
19741977
)
19751978

19761979

1977-
def create_llvm_cmake_factory(builder_type):
1980+
def create_llvm_build_factory(builder_type):
19781981
factory = BuildFactory()
19791982
add_env_setup_step(factory, builder_type)
19801983
add_get_llvm_source_steps(factory, builder_type)
@@ -2002,7 +2005,7 @@ def create_llvm_builders():
20022005
name="%s/%s" % (label, w),
20032006
workerbuilddir=label,
20042007
workernames=[w],
2005-
factory=create_llvm_cmake_factory(builder_type),
2008+
factory=create_llvm_build_factory(builder_type),
20062009
collapseRequests=True,
20072010
# We want exclusive access to this workerlock
20082011
# thru all this Builder's steps. (We could probably

0 commit comments

Comments
 (0)