summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2024-04-06 19:24:01 +0300
committerEd Tanous <ed@tanous.net>2024-04-10 20:17:16 +0300
commit3cd7072b9fff77731b959b2f7b3e3750e50abfe4 (patch)
tree25705154706cef4ca837f718854c0ab1c86e8889 /meson.build
parent1827b4f1de1e42bb3e2f53f584f07bb7119a3ed2 (diff)
downloadbmcweb-3cd7072b9fff77731b959b2f7b3e3750e50abfe4.tar.xz
Move run and redfish to compile units
Meson supports unity builds[1] natively. There's no reason to continue with the pseudo unity build we've been using by putting implementations in header files. This commit is the first in a long series of starting to break this up into smaller compile units, in the hopes of dropping incremental compile times for developers, and reduce the total per-core memory usage that gcc requires. This commit breaks out the run() function from main() and the constructor of RedfishService from redfish.hpp into their own compile units. According to tracing, even after broken out, these are still by far the two longest to compile units in the build. Tested: Code compiles. Debug build on a 24 core build server results in a decrease in compile time for compiling just bmcweb from 1m38s to 1m22s. [1] https://mesonbuild.com/Unity-builds.html Change-Id: Ibf352e8aba61d64c9a41a7a76e94ab3b5a0dde4b Signed-off-by: Ed Tanous <ed@tanous.net>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build7
1 files changed, 6 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 9e84fa9238..1665946d85 100644
--- a/meson.build
+++ b/meson.build
@@ -387,11 +387,16 @@ bmcweb_dependencies += conf_h_dep
fs = import('fs')
srcfiles_bmcweb = files(
+ # Begin large files, should be at the beginning
+ 'redfish-core/src/redfish.cpp',
+ 'src/webserver_run.cpp',
+ # end large files
+
'redfish-core/src/error_messages.cpp',
'redfish-core/src/registries.cpp',
'redfish-core/src/utils/dbus_utils.cpp',
- 'redfish-core/src/utils/time_utils.cpp',
'redfish-core/src/utils/json_utils.cpp',
+ 'redfish-core/src/utils/time_utils.cpp',
'src/boost_asio_ssl.cpp',
'src/boost_asio.cpp',
'src/boost_beast.cpp',