shaderc icon indicating copy to clipboard operation
shaderc copied to clipboard

Publish Blaze/Bazel build files

Open abergmeier-dsfishlabs opened this issue 8 years ago • 7 comments

Since this is a Google project I am somewhat sure that internally, you have BUILD files for building all this. Please make them available to the public.

abergmeier-dsfishlabs avatar Feb 13 '17 16:02 abergmeier-dsfishlabs

Sorry, I don't know of any Blaze/BUILD files for Shaderc. I'd be happy to accept a contribution in this area, but would rely on the community to verify its correctness.

dneto0 avatar Feb 13 '17 16:02 dneto0

If shaderc is used internally at google, how is it integrated with the rest of Blaze based projects, then?

abergmeier-dsfishlabs avatar Feb 14 '17 09:02 abergmeier-dsfishlabs

You seem to be making certain assumptions, without evidence.

My team maintains Shaderc in the service of the graphics community, with a focus on Vulkan. I'm glad you're interested in it. We also ship Shaderc in the Android NDK, for use by Android developers specifically.

Again, I'd gladly accept contributions in this area.

dneto0 avatar Feb 14 '17 16:02 dneto0

You seem to be making certain assumptions

Sorry. Last information I had was that ANDROID NDK is being built with Bazel by now.

abergmeier-dsfishlabs avatar Feb 15 '17 10:02 abergmeier-dsfishlabs

The Android NDK build is described in https://android.googlesource.com/platform/ndk/+/master/README.md

If you trace down through the NDK's checkbuild.py script, you'll see the "shader-tools" module. That's what builds Shaderc. It invokes the cmake flow to build host executables. Shaderc is also delivered as source libraries with accompanying Android.mk files for integration directly into Android applications.

dneto0 avatar Feb 15 '17 15:02 dneto0

I'll be working on this in the coming days.

dnovillo avatar Aug 19 '19 16:08 dnovillo

I started creating Bazel build definitions for personal use and encountered the following issue: https://github.com/bazelbuild/bazel/issues/11672

Basically, Bazel mis-includes files if their name collides with a Windows SDK file, and both the local file and SDK file are needed to build. For shaderc, this means that io.h in libshaderc_util doesn't get included properly on Windows, and as a result, the targets fail to build.

This might be able to be addressed within Bazel, but an alternative solution would be to just rename io.h to something else, e.g. io_shaderc.h. Would the maintainers of shaderc be open to such a patch? If so, I'd be happy to provide it, and provide my BUILD file.

My Bazel BUILD file is available here.

dadrian avatar Feb 25 '21 00:02 dadrian