camsas / firmament

The Firmament cluster scheduling platform
Apache License 2.0
415 stars 79 forks source link

Improve build system #4

Closed ms705 closed 8 years ago

ms705 commented 11 years ago

Edit, July 2015: generalized this into a point about the build system as a whole.

We should move the build system over to a somewhat less hacky setup. There are several problems with the current build system:

  1. The use of per-module libraries to aggregate object files (libfirmament_*.a) is convenient for specifying cross-module dependencies, but inhibits us from using different build options for different targets (e.g. AddressSanitizer does not work with the TaskLib .so).
  2. The per-directory Makefiles can get quite messy. For example, the Makefile in src/engine duplicates a lot of trivial code across the coordinator and coordinator_sim targets, and there are long lists of manual dependency specifications.
  3. We cannot easily include or exclude modules from the build. This is problematic for building the simulator and the coordinator separately (rather than always building both), building unit tests separately, and for integrating future adaptors for other orchestration systems.

As a solution, we could either:

  1. Move the build system to automake.
  2. Move the build system to CMake.
  3. Hand-roll a better build system ourselves.

(Mentioning @AdamGleave re prior conversations on this.)

ms705 commented 9 years ago

Updated the above to generalize to a revamp of the build system as a whole; mentioned @AdamGleave.

ms705 commented 8 years ago

I'm working on a port to CMake, and will have this up in an experimental branch soon.

ms705 commented 8 years ago

Tracking the initial CMake port in CL 261812.

This currently still needs:

ms705 commented 8 years ago

This is now merged as 381adf11518e1f5833f74a7c66da06790bcecd92. We will address OS-specific peculiarities and remove the old build system in separate commits. There may be some teething problems with the new build system, but it should support all targets that existed in the old one.

The README has been updated to outline the new build workflow.