diff --git a/.github/workflows/bazel-build.yml b/.github/workflows/bazel-build.yml deleted file mode 100644 index 2fc2a3bf..00000000 --- a/.github/workflows/bazel-build.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Bazel build - -on: - pull_request: - -permissions: read-all - -jobs: - bazel-build: - name: Build and run tests using Bazel - strategy: - matrix: - # Workaround for https://github.com/actions/runner-images/issues/7675. - os: [ubuntu-latest, macos-latest, windows-2019] - runs-on: ${{matrix.os}} - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - fetch-depth: '0' - - name: Clone submodules - run: git submodule update --init --recursive - - name: Mount Bazel cache - uses: actions/cache@v3 - with: - path: ~/.bazel/cache - key: bazel-cache-${{ runner.os }} - - name: Build - run: bazel --output_user_root=~/.bazel/cache build :all diff --git a/BUILD.bazel b/BUILD.bazel deleted file mode 100644 index dd7c4964..00000000 --- a/BUILD.bazel +++ /dev/null @@ -1,166 +0,0 @@ -package( - default_visibility = ["//visibility:private"], -) - -# Description: -# -# SPIRV-Reflect is a lightweight library that provides a C/C++ reflection API for SPIR-V shader bytecode in Vulkan applications. - -licenses(["notice"]) # Apache 2.0 - -exports_files([ - "CHANGES", - "LICENSE", -]) - -COPTS_WINDOWS = [ - "/Gy", - "/Gw", - - "/W3", - "/WX", -] - -COPTS_DEFAULT = [ - "-ffunction-sections", - "-fdata-sections", - - "-Werror", - "-Wswitch", - "-Wimplicit-fallthrough", - "-Wunused-variable", -] - -COMMON_COPTS = select({ - "@bazel_tools//src/conditions:windows": COPTS_WINDOWS, - "//conditions:default": COPTS_DEFAULT, -}) - -COMMON_CPPOPTS = select({ - "@bazel_tools//src/conditions:windows": COPTS_WINDOWS + [ - "/std:c++14" - ], - "//conditions:default": COPTS_DEFAULT + [ - "-std=c++14", - ] -}) - -COMMON_LINKOPTS = select({ - "@bazel_tools//src/conditions:darwin": ["-Wl,-dead_strip"], - "@bazel_tools//src/conditions:windows": ["/OPT:REF"], - "//conditions:default": ["-Wl,--gc-sections"], -}) - -cc_library( - name = "libspirv_reflect", - srcs = ["spirv_reflect.c"], - hdrs = [ - "include/spirv/unified1/spirv.h", - "spirv_reflect.h", - ], - copts = COMMON_COPTS, - visibility = ["//visibility:public"], -) - -cc_library( - name = "libcommon", - srcs = ["common/output_stream.cpp"], - hdrs = ["common/output_stream.h"], - copts = COMMON_CPPOPTS, - includes = ["common"], - deps = [ - ":libspirv_reflect", - ], -) - -cc_library( - name = "libexample", - srcs = [ - "examples/arg_parser.cpp", - "examples/common.cpp", - ], - hdrs = [ - "examples/arg_parser.h", - "examples/common.h", - ], - copts = COMMON_CPPOPTS, - includes = ["examples"], - deps = [ - ":libcommon", - ":libspirv_reflect", - ], -) - -cc_binary( - name = "hlsl_resource_types", - srcs = [ - "examples/main_hlsl_resource_types.cpp", - ], - copts = COMMON_CPPOPTS, - includes = ["examples"], - linkopts = COMMON_LINKOPTS, - deps = [ - ":libcommon", - ":libexample", - ":libspirv_reflect", - ], -) - -cc_binary( - name = "stripper", - srcs = [ - "util/stripper/io.h", - "util/stripper/main.cpp", - "util/stripper/stripper.cpp", - "util/stripper/stripper.h", - ], - copts = COMMON_CPPOPTS, - includes = ["util/stripper"], - linkopts = COMMON_LINKOPTS, -) - -cc_binary( - name = "io_variables", - srcs = [ - "examples/main_io_variables.cpp", - "examples/sample_spv.h", - ], - copts = COMMON_CPPOPTS, - includes = ["examples"], - linkopts = COMMON_LINKOPTS, - deps = [ - ":libcommon", - ":libexample", - ":libspirv_reflect", - ], -) - -cc_binary( - name = "descriptors", - srcs = [ - "examples/main_descriptors.cpp", - "examples/sample_spv.h", - ], - copts = COMMON_CPPOPTS, - includes = ["examples"], - linkopts = COMMON_LINKOPTS, - deps = [ - ":libcommon", - ":libexample", - ":libspirv_reflect", - ], -) - -cc_binary( - name = "spirv-reflect", - srcs = [ - "main.cpp", - ], - copts = COMMON_CPPOPTS, - linkopts = COMMON_LINKOPTS, - deps = [ - ":libcommon", - ":libexample", - ":libspirv_reflect", - ], -) diff --git a/WORKSPACE b/WORKSPACE deleted file mode 100644 index 89d2053b..00000000 --- a/WORKSPACE +++ /dev/null @@ -1,2 +0,0 @@ -# Bazel build needs WORKSPACE file on the top of the source tree. -# Even though this is an empty WORKSPACE file, *DO NOT REMOVE* it.