Swift build-script Smaller Memory Footprint?

Hello,

I’m installing Swift 3 on FreeBSD 11. After installing the necessary dependencies, I now only need to run the build-script.

The problem is that I cannot proceed beyond:

Linking CXX executable bin/llvm-lto

because I consistently run out of memory on my 16GB server.

From what I’ve gathered, the problem lies in ld which is apparently infamous for this sort of behavior.

I know that I can run ld without debug options (which would reduce its memory footprint dramatically) but I don’t know how I would do that, given that it is called by the build-script.

What do I need to do to make the build-script use less memory?

— Brandon Bradley

On Darwin (which uses its own linker and not GNU ld), you can definitely build Swift with less than 16GB of RAM available.

Maybe you could try gold?

Slava

···

On May 6, 2017, at 7:21 PM, Brandon B via swift-users <swift-users@swift.org> wrote:

Hello,

I’m installing Swift 3 on FreeBSD 11. After installing the necessary dependencies, I now only need to run the build-script.

The problem is that I cannot proceed beyond:

> Linking CXX executable bin/llvm-lto

because I consistently run out of memory on my 16GB server.

From what I’ve gathered, the problem lies in ld which is apparently infamous for this sort of behavior.

I know that I can run ld without debug options (which would reduce its memory footprint dramatically) but I don’t know how I would do that, given that it is called by the build-script.

What do I need to do to make the build-script use less memory?

— Brandon Bradley
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Prior to the script hanging, I see the following:

ninja: no work to do
llvm: using gold linker

Presumably that means I am using gold, correct?

···

On May 6, 2017, at 9:21 PM, Brandon B <brandonb2019@gmail.com> wrote:

Hello,

I’m installing Swift 3 on FreeBSD 11. After installing the necessary dependencies, I now only need to run the build-script.

The problem is that I cannot proceed beyond:

> Linking CXX executable bin/llvm-lto

because I consistently run out of memory on my 16GB server.

From what I’ve gathered, the problem lies in ld which is apparently infamous for this sort of behavior.

I know that I can run ld without debug options (which would reduce its memory footprint dramatically) but I don’t know how I would do that, given that it is called by the build-script.

What do I need to do to make the build-script use less memory?

— Brandon Bradley