Просмотр исходного кода

Remove duplicate file and fix to include the bin directory (#7073)

Noticed this when testing the Carbon toolchain with a more complex
environment, don't have any way to observe this at the moment in Bazel
though.

Assisted-by: Antigravity with Gemini
Chandler Carruth 2 недель назад
Родитель
Сommit
896338d281

+ 0 - 25
bazel/cc_toolchains/make_include_copts.bzl

@@ -1,25 +0,0 @@
-# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
-# Exceptions. See /LICENSE for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-"""Workaround for lack of easy way to add private includes.
-
-This is a workaround for the following Bazel issue:
-https://github.com/bazelbuild/bazel/issues/2670
-"""
-
-def make_include_copts(include_dirs):
-    """Create `copts` to search the provided directories for includes."""
-    copts = []
-    prefix = ""
-
-    repo_name = native.repository_name()
-    if repo_name != "@":
-        prefix = "external/{}/".format(repo_name[1:])
-
-    package_name = native.package_name()
-    for include_dir in include_dirs:
-        copts.append("-I{}{}/{}".format(prefix, package_name, include_dir))
-        copts.append("-I$(GENDIR)/{}{}/{}".format(prefix, package_name, include_dir))
-
-    return copts

+ 1 - 0
toolchain/install/bazel/make_include_copts.bzl

@@ -20,6 +20,7 @@ def make_include_copts(include_dirs):
     package_name = native.package_name()
     for include_dir in include_dirs:
         copts.append("-I{}{}/{}".format(prefix, package_name, include_dir))
+        copts.append("-I$(BINDIR)/{}{}/{}".format(prefix, package_name, include_dir))
         copts.append("-I$(GENDIR)/{}{}/{}".format(prefix, package_name, include_dir))
 
     return copts