Mesa (master): microsoft/clc: Allow building with Clang git
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Nov 27 13:05:18 UTC 2020
Module: Mesa
Branch: master
Commit: 3a134abab8e3c2e7f5e3a8c3b94a657c9b7cca6f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3a134abab8e3c2e7f5e3a8c3b94a657c9b7cca6f
Author: Daniel Stone <daniels at collabora.com>
Date: Thu Nov 26 19:25:32 2020 +0000
microsoft/clc: Allow building with Clang git
clang's version argument will return '1.2.3git' when built from a
non-release source tree, but the resource directory will be '1.2.3'.
Strip the 'git' suffix if it's there.
Signed-off-by: Daniel Stone <daniels at collabora.com>
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7537>
---
src/microsoft/clc/meson.build | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/microsoft/clc/meson.build b/src/microsoft/clc/meson.build
index 9dc371d21e4..dac26ab9c7b 100644
--- a/src/microsoft/clc/meson.build
+++ b/src/microsoft/clc/meson.build
@@ -19,9 +19,14 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
+clang_ver_dir = dep_clang.version()
+if clang_ver_dir.endswith('git')
+ clang_ver_dir = clang_ver_dir.substring(0, -3)
+endif
+
clang_resource_dir = join_paths(
dep_clang.get_variable(cmake: 'CLANG_INCLUDE_DIRS'), '..',
- 'lib', 'clang', dep_clang.version(), 'include'
+ 'lib', 'clang', clang_ver_dir, 'include'
)
opencl_c_h = custom_target(
More information about the mesa-commit
mailing list