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

Restructure the patches dir in expectation of non-llvm patches. (#2469)

Per #2463 we're looking at adding more patches, this updates .pre-commit-config.yaml and sets up the directory structure to be more accommodating to more patches.
Jon Ross-Perkins 3 лет назад
Родитель
Сommit
4fc120f935

+ 2 - 3
.pre-commit-config.yaml

@@ -180,7 +180,6 @@ repos:
               .github/pull_request_template.md|
               compile_flags.txt|
               third_party/.*|
-              bazel/llvm_patches/.*\.patch|
               .*\.def|
               .*\.svg|
               .*/fuzzer_corpus/.*|
@@ -188,10 +187,10 @@ repos:
           )$
       - id: check-links
 
-# Most third-party code is in submodules; local commits are excluded here.
-# We fully exclude fuzzer corpus directories as they are generated binary data.
+# This excludes third-party code, and patches to third-party code.
 exclude: |
   (?x)^(
+      bazel/patches/.*\.patch|
       third_party/examples/.*/carbon/.*|
       third_party/llvm-project/.*|
   )$

+ 2 - 2
WORKSPACE

@@ -119,8 +119,8 @@ http_archive(
     build_file_content = "# empty",
     patch_args = ["-p1"],
     patches = [
-        "@carbon//bazel/llvm_patches:0001_Patch_for_mallinfo2_when_using_Bazel_build_system.patch",
-        "@carbon//bazel/llvm_patches:0002_Added_Bazel_build_for_compiler_rt_fuzzer.patch",
+        "@carbon//bazel/patches/llvm:0001_Patch_for_mallinfo2_when_using_Bazel_build_system.patch",
+        "@carbon//bazel/patches/llvm:0002_Added_Bazel_build_for_compiler_rt_fuzzer.patch",
     ],
     sha256 = "8e9cbb937b1a40536cd809e09603a1810d86a8c314fee0cca36fc493e78289e5",
     strip_prefix = "llvm-project-{0}".format(llvm_version),

+ 0 - 0
bazel/llvm_patches/0001_Patch_for_mallinfo2_when_using_Bazel_build_system.patch → bazel/patches/llvm/0001_Patch_for_mallinfo2_when_using_Bazel_build_system.patch


+ 0 - 0
bazel/llvm_patches/0002_Added_Bazel_build_for_compiler_rt_fuzzer.patch → bazel/patches/llvm/0002_Added_Bazel_build_for_compiler_rt_fuzzer.patch


+ 0 - 0
bazel/llvm_patches/BUILD → bazel/patches/llvm/BUILD