Skip to content

Conversation

sunlei
Copy link
Collaborator

@sunlei sunlei commented Jan 25, 2025

Pull Request

Use mold as the linker.

Type of change

  • New feature (non-breaking change which adds functionality)

How has this change been tested?

Verified mold usage with readelf:
More detail: https://github.com/nautechsystems/nautilus_trader/actions/runs/12972428504/job/36179870352?pr=2254 (Verify mold)

----------
Processing: nautilus_core/target/debug/nautilus

String dump of section '.comment':
  [     0]  mold 2.36.0 (c3a957c4dc0788ba1e05eea8129c0784cf65fc59; compatible with GNU ld)
  [    4f]  GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
  [    7a]  Ubuntu clang version 18.1.3 (1ubuntu1)
  [    a1]  rustc version 1.84.0 (9fc6b4312 2025-01-07)

----------
Processing: nautilus_core/target/debug/libnautilus_pyo3.so

String dump of section '.comment':
  [     0]  mold 2.36.0 (c3a957c4dc0788ba1e05eea8129c0784cf65fc59; compatible with GNU ld)
  [    4f]  GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
  [    7a]  Ubuntu clang version 18.1.3 (1ubuntu1)
  [    a1]  rustc version 1.84.0 (9fc6b4312 2025-01-07)

----------
Processing: nautilus_core/target/debug/tardis-http

String dump of section '.comment':
  [     0]  mold 2.36.0 (c3a957c4dc0788ba1e05eea8129c0784cf65fc59; compatible with GNU ld)
  [    4f]  GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
  [    7a]  Ubuntu clang version 18.1.3 (1ubuntu1)
  [    a1]  rustc version 1.84.0 (9fc6b4312 2025-01-07)

----------
Processing: nautilus_core/target/debug/tardis-csv

String dump of section '.comment':
  [     0]  mold 2.36.0 (c3a957c4dc0788ba1e05eea8129c0784cf65fc59; compatible with GNU ld)
  [    4f]  GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
  [    7a]  Ubuntu clang version 18.1.3 (1ubuntu1)
  [    a1]  rustc version 1.84.0 (9fc6b4312 2025-01-07)

----------
Processing: nautilus_core/target/debug/libnautilus_cryptography.so

String dump of section '.comment':
  [     0]  mold 2.36.0 (c3a957c4dc0788ba1e05eea8129c0784cf65fc59; compatible with GNU ld)
  [    4f]  GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
  [    7a]  Ubuntu clang version 18.1.3 (1ubuntu1)
  [    a1]  rustc version 1.84.0 (9fc6b4312 2025-01-07)

----------
Processing: nautilus_core/target/debug/libnautilus_infrastructure.so

String dump of section '.comment':
  [     0]  mold 2.36.0 (c3a957c4dc0788ba1e05eea8129c0784cf65fc59; compatible with GNU ld)
  [    4f]  GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
  [    7a]  Ubuntu clang version 18.1.3 (1ubuntu1)
  [    a1]  rustc version 1.84.0 (9fc6b4312 2025-01-07)

----------
Processing: nautilus_core/target/debug/libnautilus_risk.so

String dump of section '.comment':
  [     0]  mold 2.36.0 (c3a957c4dc0788ba1e05eea8129c0784cf65fc59; compatible with GNU ld)
  [    4f]  GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
  [    7a]  rustc version 1.84.0 (9fc6b4312 2025-01-07)

@sunlei sunlei changed the title [WIP] Use mold as the linker Use mold as the linker Jan 26, 2025
@cjdsellers
Copy link
Member

Hi @sunlei

Thanks for looking into this.

I think this is a good change, as we can reasonably expect performance improvements. Since it’s limited to CI, it won’t add complexity to local builds for users installing from source.

Developers more familiar with the codebase can continue experimenting with mold locally to potentially speed up the dev iteration cycle.

@cjdsellers cjdsellers merged commit 638e41c into develop Jan 26, 2025
13 checks passed
@cjdsellers cjdsellers deleted the sunlei/build-linker branch January 26, 2025 22:46
@cjdsellers cjdsellers changed the title Use mold as the linker Use mold as the linker in CI Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants