Before, we did set cxx version to c++17 using COPTS in our bazel files.
This was wrong, and part of the dependencies were then built with the
default standard version. This was not an issue until we moved to c++17.
Then, we decided to use the bazel --cxxopt=-std=c++17, but this was only
valid for nix platforms.
The last option left is to ask the user to specify the standard
when building using bazel.
Adding a new type instruction required making the same change in two
places.
Also remove IsCompileTimeConstantInst that was used in a single place
and replace its use by an expression that better conveys the intent.
Change-Id: I49330b74bd34a35db6369c438c053224805c18e0
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
This commit adds a C++ wrapper above the current spvBinaryParse
function. I tried to match it 1:1, except for 2 things:
- std::function<>& are used. No more function pointers, allowing
context capture.
- spv_result_t replaced with a boolean, to match other C++ apis.
Callbacks still return a spv_result_t because the underlying implem
relies on that. The convertion from spv_result_t to boolean is only done
at the boundary.
Signed-off-by: Nathan Gauër <brioche@google.com>
2f2e72bae9...3d568bdda5
$ git log 2f2e72bae..3d568bdda --date=short --no-merges --format='%ad %ae %s'
2023-02-06 absl-team Add support for the alternative base64 encoding in RFC 4648 section 5 to `WhenBase64Unescaped`.
Created with:
roll-dep external/googletest
Co-authored-by: GitHub Actions[bot] <>
* Update fuzz tests to not use invalid combinations of LoopMerge + BranchConditional
New IDs were selected to make clear the transformation being done here, instead
of reordering all IDs in between or refactoring the SPIR-V in the test.
* spirv-val: Conditional Branch without an exit is invalid in loop header
From 2.16.2, for CFG:
Selections must be structured. That is, an OpSelectionMerge
instruction is required to precede:
- an OpSwitch instruction
- an OpBranchConditional instruction that has different True Label
and False Label operands where neither are declared merge blocks
or Continue Targets.
When the build is done on a shallow repo, or on a non-git copy,
the version script failed. We should not hard fail, but generate
a "version" (unknown).
Sample outputs:
with git history:
`"v2023.2-dev", "SPIRV-Tools v2023.2-dev v2022.4-87-g53541064"`
with shallow clone:
`"unknown_version", "SPIRV-Tools unknown_version d8759a140bc65811332d5f91f3b08febadd5a21d"`
not a git repo:
`"unknown_version", "SPIRV-Tools unknown_version unknown_hash, 2023-02-02T16:25:48.077995"`
* Fix null pointer in FoldInsertWithConstants.
Struct types are not supported in constant folding yet.
* Added 'Test case 16' to fold_test.
Tests OpCompositeInsert not to be folded on a struct type.
Contributes to https://github.com/KhronosGroup/glslang/issues/2439
* When OpTypeStruct is used in Vulkan env and its last member
is a RuntimeArray, check if the struct is decorated with
Block or BufferBlock, as required by VUID-...-04680.
-Make more use of InstructionBuilder instruction helper methods
-Use MakeUnique<>() rather than new
-Add InstrumentPass::GenReadFunctionCall() which optimizes function
calls in a loop with constant arguments and no side effects.
This is a prepatory change for future work on the instrumentation
code which will add more generated functions.
This commit changes the way bazel chooses which version to build.
Before, we had a COPT set to -std=c++17, which is analogous to the cmake
way.
However, googletest decided to follow abseil, meaning this is *not*
recommended at all, and causes a mixed-standard build.
From https://github.com/abseil/abseil-cpp/blob/master/FAQ.md#how-to-i-set-the-c-dialect-used-to-build-abseil
we have 3 options to define the standard. Using a bazelrc is what I
believe to be the simplest, as it "fixes" the repo standard.
Signed-off-by: Nathan Gauër <brioche@google.com>
The CHANGES file was an alternative source of truth that was trying
to duplicate/replace the git history truth.
This allow us to change the way we handle releases so we don't have to make
sure our CHANGES PR are linked to the tag and tested PR, simplifying the
process.
This should help with avoiding mistakes such as the one that happened under #4958.
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: I922f02e25c507f3412e0e7a99f525fb617b2d426
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Kokoro clones repos with a different user used to run the build steps,
meaning if some git command must be run at build time, they will fail
because of this dubious ownership issue.
Running some git commands makes only sense with history, so changing
checkout depth so we can run them and get the true result.
This is a known Kororo issue.
Fixing this is required to generate the version file using git history.
Signed-off-by: Nathan Gauër <brioche@google.com>
Signed-off-by: Nathan Gauër <brioche@google.com>
Kokoro clones repos with a different user used to run the build steps,
meaning if some git command must be run at build time, they will fail
because of this dubious ownership issue.
Running some git commands makes only sense with history, so changing
checkout depth so we can run them and get the true result.
This is a known Kororo issue.
Fixing this is required to generate the version file using git history.
Signed-off-by: Nathan Gauër <brioche@google.com>
* build: move from c++11 to c++17
Moving from cpp 11 to cpp 17 will allow us to use modern features like
filesystem support, optional, any, execution policies and improved
templates.
Signed-off-by: Nathan Gauër <brioche@google.com>
The bazel build are set up to run any time there is a push to any branch. This
cause the same workflow to be run twice when a PR is updated.
I'm changing the workflow to trigger on there is a push to "main", for the
continuous test, and leaving the pull_request trigger for the presubmit test.
The current bot is having trouble with the CLA. I checked with the Khronos
admin, and this was his reply:
> We already safe list *[bot] which should account for all GitHub bots. If you
have manually named the GitHub Actions bot to GitHub Actions bot, it should be
renamed to GitHub Actions[bot]. This should resolve the issue.
Trying that to see if it works.
Adding a github action to open a PR when the DEPS can be updated.
It will run once a day or it can be manually triggered.
I updated roll_deps.sh so that it will not return an error if there were no new
commits for a repository.
Avoid using OpConstantNull with types that do not allow it.
Update existing tests for slight changes in code generation.
Add new tests based on the Vulkan Validation layer test case
that exposed this problem.
* Roll external/effcee/ 35912e1b7..c7b4db79f (1 commit)
35912e1b77...c7b4db79f3
$ git log 35912e1b7..c7b4db79f --date=short --no-merges --format='%ad %ae %s'
2022-12-20 dneto Update Bazel external dependencies
Created with:
roll-dep external/effcee
* Roll external/googletest/ v1.12.0..356fc3012 (117 commits)
https://github.com/google/googletest/compare/v1.12.0...356fc3012513
$ git log v1.12.0..356fc3012 --date=short --no-merges --format='%ad %ae %s'
2023-01-12 tomhughes Fix -Wshadow warnings
2023-01-12 dmauro Add an explicit #error that C++ versions less than C++14 are not supported
2023-01-11 dmauro Update GoogleTest dependencies
2023-01-05 tomhughes Fix GTEST_OS_ESP8266 check
2023-01-05 tomhughes IWYU: Add missing std includes
2023-01-04 dmauro Workaround for GCC12 bug illustrated by https://godbolt.org/z/Pe5aE59xG
2023-01-04 tomhughes Fix _MSC_VER check
2022-12-22 absl-team Use a more recent commit of googletest that uses OS constraints from @platforms//os:* instead of from @build_tools//platforms:*
2022-12-20 absl-team Fix a typo in the documentation for "Using Predicates as Matchers".
2022-12-20 dinor Comment that q0_ in primer should remain empty
2022-12-19 absl-team Specify a name for a `Property` in a code example.
2022-12-15 absl-team Shut up a Clang warning.
2022-12-14 absl-team Fix a typo in the gMock sample code for Defining a Custom Matcher Class.
2022-12-12 dmauro Convert feature requests to a form
2022-12-12 absl-team Refactor matrix verification into VerifyMatchMatrix.
2022-12-12 absl-team Introduces a new porting flag (GTEST_HAS_FILE_SYSTEM) to indicate whether a platform supports filesystem operations.
2022-12-08 tomhughes Fall back to the system clock when building with newlib on a system without a monotonic clock.
2022-12-07 dmauro Migrate GoogleTest to a bug report template and add a link to the discussion forum for non-bugs
2022-12-05 dmauro Remove the unused class TestNameIs
2022-11-30 absl-team Make SizeIsMatcher::Impl conform to the contract of MatcherDescriberInterface.
2022-11-29 absl-team Disables `-Wunused-member-function` and `-Wused-but-marked-unused` that trigger via `MOCK_METHOD()` and `EXPECT_THAT()` macros.
2022-11-23 absl-team This commit fixes a minor verb conjugation error in gmock_cook_book.md.
2022-11-20 i Change MakeUnique -> std::make_unique in docs
2022-11-16 absl-team When printing floating-point numbers, print full precision by default.
2022-11-15 absl-team Remove incorrect usage of GTEST_ATTRIBUTE_UNUSED_ on classes.
2022-11-12 m.h1ch4m
2022-11-12 m.h1ch4m fixing gcc.gnu domain redirection
2022-11-11 absl-team Defined a testing::SrcDir() function that returns the name of a directory where ancillary data files can be found.
2022-11-10 i Support kitty TERM
2022-11-08 absl-team Remove incorrect GTEST_ATTRIBUTE_UNUSED_ from InSequence class.
2022-11-07 absl-team RecordProperty serializes ints and 64-bit ints, including size_ts
2022-11-05 absl-team Fix typo in documentation of ConvertGenerator()
2022-11-03 absl-team Add documentation for `--gunit_recreate_environments_when_repeating`.
2022-10-25 dinor Use git commit hash in CMake quickstart
2022-10-24 absl-team Clarify that parameter generator does not evaluate immediately
2022-10-21 i Fix format without expectation name
2022-10-21 i Change messages
2022-10-20 i Allow naming expectations #3970
2022-10-18 absl-team CMake: Add GTEST_HAS_ABSL build option for using Absl
2022-10-18 absl-team Adds Win32 UNC path support to FilePath::IsAbsolutePath() and FilePath::IsRootDirectory() in GoogleTest
2022-10-17 dmauro Fix detection of the no_sanitize("hwaddress") attribute
2022-10-17 dinor Add Windows CI script
2022-10-16 i Add return for GTEST_FAIL_AT
2022-10-14 dmauro Use attribute testing to simplify portable attribute macros
2022-10-14 absl-team Terse printing of std::reference_wrapper hides pointer
2022-10-14 janbruckner Fix table markup in testing.md
2022-10-12 absl-team Workaround for Visual C++ error C2039 with std::tuple_element_t.
2022-10-11 i Fix JSON output format #3884
2022-10-07 ferenc.gm Suggests a release with fixed CMakeLists.txt
2022-10-08 julian.amann Update rules_python, bazel_skylib and platfroms
(...)
2022-09-01 absl-team Fixed header guards to match style guide conventions.
2022-08-26 absl-team Consider all TERM values ending in "-256color" to be color supporting. In particular this handles TERM=hterm-256color correctly.
2022-08-22 hardikv Add support of 19-member structs to gmock UnpackStructImpl.
2022-08-19 keithbsmiley bazel: move -std=c++14 to .bazelrc
2022-08-16 dmauro Update README.md to point to the Foundational C++ Support Policy
2022-08-12 dmauro Add --features=external_include_paths to Bazel CI to ignore warnings from dependencies
2022-08-08 dinor gtest_unittest: Call FAIL() in lambda, fix incorrect fatality expectation
2022-08-04 dinor Explicitly instantiate matchee std::string in MatchesRegex
2022-07-31 bmburstein Custom type with Combine(). Fix for #3781
2022-07-28 absl-team Add support of 18-member structs to gmock UnpackStructImpl.
2022-07-25 dinor Add IsEmpty overload for C-style strings
2022-07-21 thegeorg Continuation for #3183
2022-07-20 matdibu gtest-death-test: add 'noreturn'
2022-06-28 dev Set cmake policy CMP0069
2022-07-14 polushin export ThreadLocalValueHolderBase which is required by exported APIs.
2022-07-11 polushin cmake: make PDB output directory match that of a static library.
2022-07-11 polushin cmake: find python in order specified by PATH environment variable.
2022-07-11 dmauro Add envvar BAZEL_CXXOPTS=-std=c++14 to the GitHub Actions CI
2022-07-08 dmauro CMake: raise the default C++ standard to cxx_std_14
2022-07-07 ckennelly Enable heterogeneous lookup for RegisteredTestsMap.
2022-07-01 nikiforov.al cleanup from unique_ptr branch
2022-07-01 dmauro Remove the Bazel provided default cxxopt -std=c++0x and replace it with -std=c++14 when testing with GCC 5.
2022-07-01 57719497+yutotnh fix: some typos in source
2022-07-01 57719497+yutotnh fix: typo in test name
2022-07-01 57719497+yutotnh fix: some typos in comment
2022-06-30 dmauro Remove support for C++11
2022-06-30 dmauro Update version number in CMakeLists.txt Note that this is 1.12.1 as there will be a patch release to fix this
2022-06-29 absl-team Add support of 17-member structs to gmock UnpackStructImpl.
2022-06-27 absl-team Mark internal-only function as having internal linkage.
2022-06-27 93249401+assafpr Update gtest.cc
2022-06-27 93249401+assafpr Update gmock-matchers.h
2022-06-27 93249401+assafpr Update gmock-actions.h
2022-06-27 93249401+assafpr Update gmock-spec-builders_test.cc
2022-06-27 93249401+assafpr Update gtest-death-test.cc
2022-06-27 93249401+assafpr Update gmock-spec-builders.cc
2022-06-27 93249401+assafpr Update advanced.md
2022-06-26 asmodai27 Avoid implicit conversion from int to char
2022-06-26 asmodai27 Avoid implicit conversion from int to char
2022-06-25 julian.arkenau docs: update googletest README for release 1.12.0
2022-06-23 dmauro Update README.md for release 1.12.0
2022-06-22 93249401+assafpr documentation, change mater branch to main
2022-06-22 93249401+assafpr Update faq.md
2022-06-22 93249401+assafpr Update CONTRIBUTING.md
2022-06-22 93249401+assafpr documentation, change mater branch to main
2022-06-22 93249401+assafpr documentation, change mater branch to main
2022-06-22 93249401+assafpr Update gmock_output_test_golden.txt
2022-06-22 93249401+assafpr change link from master to main in documentation
2022-05-31 gpetit Fix for undefined symbol: testing::internal::Random::kMaxRange
2022-05-18 akohlmey set -utf-8 flag only for real MSVC compilers. E.g. not Intel's icx.exe
2022-03-26 perez.cs Fix quickstart-cmake documentation
Created with:
roll-dep external/googletest
* Roll external/re2/ d2836d1b1..954656f47 (13 commits)
d2836d1b1c...954656f47f
$ git log d2836d1b1..954656f47 --date=short --no-merges --format='%ad %ae %s'
2022-12-07 junyer Restore the "lock counter" option for `Mutex`.
2022-11-29 junyer Avoid "immortal" dynamic memory allocations.
2022-11-23 junyer Drop old compiler versions from the build matrix.
2022-11-22 junyer Control the maximum count permitted by `GlobalReplace()`.
2022-11-20 junyer Specify just the MAJOR.MINOR components to `cmake_minimum_required()`.
2022-11-18 junyer Install `re2.pc` with CMake too.
2022-10-26 junyer Reword some comments in `re2.h`.
2022-10-17 junyer Add the no-op GitHub Actions workflow for Python releases.
2022-10-17 junyer Revert "Add a GitHub Actions workflow for Python releases."
2022-10-17 junyer Add a GitHub Actions workflow for Python releases.
2022-10-17 junyer Revert "Add a GitHub Actions workflow for Python releases."
2022-10-14 junyer Add a GitHub Actions workflow for Python releases.
2022-10-14 junyer Bump versions of actions to address warnings.
Created with:
roll-dep external/re2
* Update CHANGES
* Fix release name
* Revert "Roll external/googletest/ v1.12.0..356fc3012 (117 commits)"
This reverts commit 45f5de67c6.
Rolling back this update to googletest to prevent build failures.
Our CI systems are still assuming C++0x support. Post release,
SPIRV-Tools will move to require C++17 minimum.