github.com/distbuild/reclient@v0.0.0-20240401075343-3de72e395564/third_party/patches/llvm/llvm-bzl-mingw.patch (about)

     1  diff --git a/utils/bazel/llvm-project-overlay/clang/BUILD.bazel b/utils/bazel/llvm-project-overlay/clang/BUILD.bazel
     2  index 99a6942341fb..acffa72124d8 100644
     3  --- a/utils/bazel/llvm-project-overlay/clang/BUILD.bazel
     4  +++ b/utils/bazel/llvm-project-overlay/clang/BUILD.bazel
     5  @@ -40,6 +40,13 @@ cc_binary(
     6       copts = [
     7           "$(STACK_FRAME_UNLIMITED)",
     8       ],
     9  +    linkopts = select({
    10  +        "@bazel_tools//src/conditions:windows": [
    11  +            "-luuid",
    12  +            "-lole32",
    13  +        ],
    14  +        "//conditions:default": ["-ldl"],
    15  +    }),
    16       stamp = 0,
    17       deps = [
    18           ":support",
    19  diff --git a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
    20  index 9de9ad8ae2ff..848e86b57c4a 100644
    21  --- a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
    22  +++ b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
    23  @@ -702,6 +702,13 @@ cc_binary(
    24           "include/llvm/TargetParser/SubtargetFeature.h",
    25       ]),
    26       copts = llvm_copts,
    27  +    linkopts = select({
    28  +        "@bazel_tools//src/conditions:windows": [
    29  +            "-luuid",
    30  +            "-lole32",
    31  +        ],
    32  +        "//conditions:default": [],
    33  +    }),
    34       stamp = 0,
    35       deps = [
    36           ":CodeGenTypes",