• Home
Name Date Size #Lines LOC

..--

linux64/03-May-2024-11

mac/03-May-2024-11

win/03-May-2024-11

.gitignoreD03-May-202429 43

README.mdD03-May-20241.3 KiB3123

rc.pyD03-May-202410.3 KiB276176

upload_rc_binaries.shD03-May-20241.4 KiB4729

README.md

1# rc
2
3This contains a cross-platform reimplementation of rc.exe.
4
5This exists mainly to compile .rc files on non-Windows hosts for cross builds.
6However, it also runs on Windows for two reasons:
7
81. To compare the output of Microsoft's rc.exe and the reimplementation and to
9    check that they produce bitwise identical output.
102. The reimplementation supports printing resource files in /showIncludes
11   output, which helps getting build dependencies right.
12
13The resource compiler consists of two parts:
14
151. A python script rc.py that serves as the driver.  It does unicode
16   conversions, runs the input through the preprocessor, and then calls the
17   actual resource compiler.
182. The resource compiler, a C++ binary obtained via sha1 files from Google
19   Storage.  The binary's code currenty lives at
20   https://github.com/nico/hack/tree/master/res, even though work is (slowly)
21   underway to upstream it into LLVM.
22
23To update the rc binary, run `upload_rc_binaries.sh` in this directory, on a
24Mac.
25
26rc isn't built from source as part of the regular chrome build because
27it's needed in a gn toolchain tool, and these currently cannot have deps.
28Alternatively, gn could be taught about deps on tools, or rc invocations could
29be not a tool but a template like e.g. yasm invocations (which can have deps),
30then the prebuilt binaries wouldn't be needed.
31