Compile the `diagrams` and `lgtunit` tool files in optimized mode