Commit Graph

12 Commits

Author SHA1 Message Date
Moritz Bunkus
39529c226b
languages/scripts/regions/IANA lists: use different method of initialization
The prior method was to generate one line of
`g_container.emplace_back(…)` per entry in the list & letting the
compiler chew on that. Each string argument in that call was done was
`u8"Some Name"s`, meaning as a std::string instance.

Drawbacks:

• takes the compiler ages to compile, even forcing me to drop all
  optimizations for the ISO-639 language list file

• even smaller files such as the IANA language subtag registry lists
  take more than 30s to compile

• due to no optimizations initialization is actually not as fast as
  could be

The new method uses a plain C-style array of structs with `char
const *` entries for the initial list. The initialization method then
copies the entries from that list to the actual container, again using
`std::emplace_back(…)`.

This yields sub-1s compilation times even with the longest file, the
ISO-639 language list, and the runtime initialization is actually
faster.
2022-04-23 00:00:15 +02:00
Moritz Bunkus
8c3e827e2a
build system: fix OS-based file selection for non-Linux/macOS/Windows systems
Several files have OS-specific names like "…/windows.cpp", and they
should only be compiled when currently compiling for that OS. The
three main OS mentioned in the build system are Linux, macOS and
Windows. Other Unices like FreeBSD aren't mentioned explicitly and
should be treated the same as Linux (as the code in those
Linux-specific files is rather Unix-but-not-macOS-specific).

Fixes #3316.
2022-04-06 22:19:55 +02:00
Moritz Bunkus
2278ae27b8
build system: only exclude OS-specific files starting with OS, e.g. windows.cpp
Otherwise p_video_for_windows.cpp, which must be compiled on all
OSses, would only be compiled on Windows.
2022-02-20 17:02:44 +01:00
Moritz Bunkus
0749f774c9
build system: exclude OS-specific files ending with e.g. …_windows.cpp 2022-02-20 12:34:17 +01:00
Moritz Bunkus
572bf8d552
Rakefile: fix name/description of target generating ISO 639 language list 2020-07-02 19:09:47 +02:00
Moritz Bunkus
485030bcc0 build system: only build files intended for target 2017-04-04 19:26:54 +02:00
Moritz Bunkus
0bad8270cb build system: fix Ruby warnings
These include:

- assigned but unused local variable
- & interpreted as argument prefix
- ambiguous first argument
- shadowed variables
2015-03-24 13:20:18 +01:00
Moritz Bunkus
69d16da4e7 build system: require Ruby 1.9.x or newer 2014-01-08 14:20:15 +01:00
Moritz Bunkus
7357c7c7fa Fix running rake with Ruby 1.8.7 2012-04-26 16:02:12 +02:00
Moritz Bunkus
1542a6bac7 Only install application icons 2012-04-11 12:00:48 +02:00
Moritz Bunkus
05573e2060 Use temp files and explicit invocation of /bin/sh on mingw 2010-08-02 23:06:48 +02:00
Moritz Bunkus
bbf395afbd Split up the Rakefile into smaller units 2010-08-01 11:12:43 +02:00