blob: a82ea26a58e47cf0acdc35bd9cb5a91b514558e5 [file] [log] [blame]
Lorenz Brunddd6caf2021-03-04 17:16:04 +01001# proto-file: build/bazel_cc_fix/ccfixspec/ccfixspec.proto
2# proto-message: CCFixSpec
3
4# Note: As of 5.10 upstream doesn't build on any Linux distro I tried. You have to patch xfs.h to include its own headers
5# and not the system ones to get it to build. Revert this patch before running bazel_cc_fix as it interferes with the
6# auto-rewriting.
7
8# To regenerate the patch, run the following in the checked-out xfsprogs repo
9# make configure
10# ./configure
11# nice intercept-build make -j$(nproc) mkfs
12
13# And the following in the monorepo root
14# bazel run //build/bazel_cc_fix -- -workspace $path_to_repo -compilation_db $path_to_repo/compile_commands.json -spec third_party/xfsprogs/cc_fix_spec.prototxt
15
16# Resolve libuuid to our util_linux workspace
17replace {
18 type: SYSTEM
19 from: "uuid/uuid.h"
20 to: "libuuid/src/uuid.h"
21}
22
23# Resolve libblkid to our util_linux workspace
24replace {
25 type: SYSTEM
26 from: "blkid/blkid.h"
27 to: "blkid.h"
28}
29
30# Resolve libinih to our inih workspace
31replace {
32 type: SYSTEM
33 from: "ini.h"
34 to: "ini.h"
35}
36
37replace {
38 type: SYSTEM
39 from: "xfs/handle.h",
40 to: "include/handle.h",
41}
42
43# Force xfsprogs to use their own headers instead of the ones of the installed (!!) xfsprogs
44replace {
45 type: SYSTEM,
46 from: "xfs/xfs_fs.h",
47 to: "libxfs/xfs_fs.h"
48}
49replace {
50 type: SYSTEM,
51 from: "xfs/xfs_types.h",
52 to: "libxfs/xfs_types.h"
53}
54replace {
55 type: SYSTEM
56 from: "xfs/"
57 to: "include/"
58}
59
Lorenz Brunddd6caf2021-03-04 17:16:04 +010060# Properly include CRC32 generated file which is also generated in the wrong place
61generated_file {
62 path: "libfrog/crc32table.h"
63}
64replace {
65 type: WORKSPACE
66 from: "libfrog/crc32table.h"
67 to: "crc32table.h"
68}