build: Update tint to use C++17.

Mirrors changes and DEPS toolchain SHAs found in https://dawn-review.googlesource.com/c/dawn/+/75061

Change-Id: I69a3b6bb091e00207d81d5dbc288b9b68fc961fc
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/75241
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton 2022-01-06 09:23:11 +00:00 committed by Tint LUCI CQ
parent 7dc901fa4f
commit 7b0686a922
4 changed files with 90 additions and 28 deletions

33
.gitignore vendored
View File

@ -6,24 +6,27 @@
.vscode/*
!.vscode/tasks.json
.idea
buildtools
cmake-build-*/
coverage.summary
default.profraw
lcov.info
out
testing
third_party/cpplint
third_party/binutils
third_party/glslang
third_party/googletest
third_party/gpuweb-cts
third_party/llvm-build
third_party/protobuf
third_party/spirv-headers
third_party/spirv-tools
tools/clang
tools/bin
/buildtools
/cmake-build-*/
/out
/testing
/third_party/clang-format
/third_party/catapult
/third_party/cpplint
/third_party/binutils
/third_party/glslang
/third_party/googletest
/third_party/gpuweb-cts
/third_party/llvm-build
/third_party/protobuf
/third_party/spirv-headers
/third_party/spirv-tools
/tools/clang
/tools/bin
/build*/
/test.wgsl

3
.gn
View File

@ -14,4 +14,7 @@
buildconfig = "//build/config/BUILDCONFIG.gn"
# Use Python3 to run scripts. On Windows this will use python.exe or python.bat
script_executable = "python3"
check_targets = [ "//*" ]

View File

@ -18,7 +18,7 @@ project(tint)
enable_testing()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_DEBUG_POSTFIX "")
if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
@ -301,7 +301,7 @@ function(tint_default_compile_options TARGET)
if (${COMPILER_IS_LIKE_GNU})
target_compile_options(${TARGET} PRIVATE
-std=c++14
-std=c++17
-fno-exceptions
-fno-rtti
-pedantic-errors

78
DEPS
View File

@ -2,20 +2,32 @@ use_relative_paths = True
gclient_gn_args_file = 'build/config/gclient_args.gni'
gclient_gn_args = [
'generate_location_tags',
]
vars = {
'chromium_git': 'https://chromium.googlesource.com',
'github': '/external/github.com',
'build_revision': 'c6c4a4c3ae890f2c020a087c90fb8c0b8be2816a',
'buildtools_revision': 'e3db55b4639f2a331af6f3708ca1fbd22322aac3',
'clang_revision': 'eb5ab41f3801e2085208204fd71a490573d72dfd',
'build_revision': '555c8b467c21e2c4b22d00e87e3faa0431df9ac2',
'buildtools_revision': 'f78b4b9f33bd8ef9944d5ce643daff1c31880189',
'catapult_revision': 'fa35beefb3429605035f98211ddb8750dee6a13d',
'clang_format_revision': '2271e89c145a5e27d6c110b6a1113c057a8301a3',
'clang_revision': '8b7330592cb85ba09505a6be7bacabd0ad6160a3',
'glslang_revision': '4b7b86d568b40f4b076259dc2fc4cdd006340f34',
'googletest_revision': '1a3e2a265f35e604378156cd675b11ef0a184627',
'googletest_revision': '6b74da4757a549563d7c37c8fae3e704662a043b',
'gpuweb_cts_revision': 'b0291fd966b55a5efc496772555b94842bde1085',
'libcxx_revision': '79a2e924d96e2fc1e4b937c42efd08898fa472d7',
'libcxxabi_revision': '2715a6c0de8dac4c7674934a6b3d30ba0c685271',
'protobuf_revision': 'fde7cf7358ec7cd69e8db9be4f1fa6a5c431386a',
'spirv_headers_revision': 'eddd4dfc930f1374a70797460240a501c7d333f7',
'spirv_tools_revision': 'df2aad68b98279412494a6d449bd71b6756e699b',
'testing_revision': '2691851e49de541c3fe42fa8692ddcdee938162f',
'testing_revision': 'd485ae97b7900c1fb7edfbe2901ae5adcb120865',
'tint_gn_revision': 'git_revision:281ba2c91861b10fec7407c4b6172ec3d4661243',
# We don't use location metadata in our test isolates.
'generate_location_tags': False,
}
deps = {
@ -41,10 +53,54 @@ deps = {
'tools/clang': Var('chromium_git') + '/chromium/src/tools/clang@' +
Var('clang_revision'),
'buildtools/clang_format/script': {
'url': Var('chromium_git') +
'/external/github.com/llvm/llvm-project/clang/tools/clang-format.git@' +
Var('clang_format_revision'),
},
'buildtools/linux64': {
'packages': [{
'package': 'gn/gn/linux-amd64',
'version': Var('tint_gn_revision'),
}],
'dep_type': 'cipd',
'condition': 'host_os == "linux"',
},
'buildtools/mac': {
'packages': [{
'package': 'gn/gn/mac-${{arch}}',
'version': Var('tint_gn_revision'),
}],
'dep_type': 'cipd',
'condition': 'host_os == "mac"',
},
'buildtools/win': {
'packages': [{
'package': 'gn/gn/windows-amd64',
'version': Var('tint_gn_revision'),
}],
'dep_type': 'cipd',
'condition': 'host_os == "win"',
},
'buildtools/third_party/libc++/trunk':
Var('chromium_git') +
'/external/github.com/llvm/llvm-project/libcxx.git@' +
Var('libcxx_revision'),
'buildtools/third_party/libc++abi/trunk':
Var('chromium_git') +
'/external/github.com/llvm/llvm-project/libcxxabi.git@' +
Var('libcxxabi_revision'),
# Dependencies required for testing
'testing': Var('chromium_git') + '/chromium/src/testing@' +
Var('testing_revision'),
'third_party/catapult': Var('chromium_git') + '/catapult.git@' +
Var('catapult_revision'),
'third_party/googletest': Var('chromium_git') + Var('github') +
'/google/googletest.git@' + Var('googletest_revision'),
@ -96,14 +152,14 @@ hooks = [
'name': 'sysroot_x86',
'pattern': '.',
'condition': 'checkout_linux and ((checkout_x86 or checkout_x64))',
'action': ['python', 'build/linux/sysroot_scripts/install-sysroot.py',
'action': ['python3', 'build/linux/sysroot_scripts/install-sysroot.py',
'--arch=x86'],
},
{
'name': 'sysroot_x64',
'pattern': '.',
'condition': 'checkout_linux and (checkout_x64)',
'action': ['python', 'build/linux/sysroot_scripts/install-sysroot.py',
'action': ['python3', 'build/linux/sysroot_scripts/install-sysroot.py',
'--arch=x64'],
},
{
@ -111,20 +167,20 @@ hooks = [
'name': 'mac_toolchain',
'pattern': '.',
'condition': 'checkout_mac',
'action': ['python', 'build/mac_toolchain.py'],
'action': ['python3', 'build/mac_toolchain.py'],
},
{
# Update the Windows toolchain if necessary. Must run before 'clang' below.
'name': 'win_toolchain',
'pattern': '.',
'condition': 'checkout_win',
'action': ['python', 'build/vs_toolchain.py', 'update', '--force'],
'action': ['python3', 'build/vs_toolchain.py', 'update', '--force'],
},
{
# Note: On Win, this should run after win_toolchain, as it may use it.
'name': 'clang',
'pattern': '.',
'action': ['python', 'tools/clang/scripts/update.py'],
'action': ['python3', 'tools/clang/scripts/update.py'],
},
{
# Pull rc binaries using checked-in hashes.
@ -142,7 +198,7 @@ hooks = [
{
'name': 'lastchange',
'pattern': '.',
'action': ['python', 'build/util/lastchange.py',
'action': ['python3', 'build/util/lastchange.py',
'-o', 'build/util/LASTCHANGE'],
},
]