Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: allow LTO with Clang 3.9.1+ #38751

Closed
wants to merge 1 commit into from
Closed

build: allow LTO with Clang 3.9.1+ #38751

wants to merge 1 commit into from

Conversation

jesec
Copy link
Member

@jesec jesec commented May 21, 2021

Bug: #38568

Test: manual,

  • arm64-apple-darwin20.5.0 / Apple clang version 12.0.5 (clang-1205.0.22.9)
  • x86_64-pc-linux-gnu / Ubuntu clang version 13.0.0-++20210520052624+48780527dd68-1~exp1~20210520153429.417
export AR=llvm-ar RANLIB=llvm-ranlib CC=clang CXX=clang++ (not needed on macOS)
./configure --enable-lto
make -j32

Note: LTO is very memory consuming, and 16GB (the largest we have for arm64 mac) is not enough. Things are A LOT slower when there is no enough memory. Don't panic, have patience and it will finish.

Signed-off-by: Jesse Chan jc@linux.com

@github-actions github-actions bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. labels May 21, 2021
@jesec
Copy link
Member Author

jesec commented May 21, 2021

cc: @gengjiawen @joyeecheung

Bug: #38568
Test: manual,
      - arm64-apple-darwin20.5.0 / Apple clang version 12.0.5 (clang-1205.0.22.9)
      - x86_64-pc-linux-gnu / Ubuntu clang version 13.0.0-++20210520052624+48780527dd68-1~exp1~20210520153429.417
Signed-off-by: Jesse Chan <jc@linux.com>
Copy link
Member

@gengjiawen gengjiawen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Great work.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

gengjiawen pushed a commit that referenced this pull request May 25, 2021
Bug: #38568
Test: manual,
      - arm64-apple-darwin20.5.0 / Apple clang version 12.0.5 (clang-1205.0.22.9)
      - x86_64-pc-linux-gnu / Ubuntu clang version 13.0.0-++20210520052624+48780527dd68-1~exp1~20210520153429.417
Signed-off-by: Jesse Chan <jc@linux.com>

PR-URL: #38751
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@gengjiawen
Copy link
Member

Landed in ab71af3

@gengjiawen gengjiawen closed this May 25, 2021
@jesec
Copy link
Member Author

jesec commented May 25, 2021

Landed in ab71af3

Thanks. 👍

and, FYI: This can be backported to v12, v14 and v16 branches. The change is small, and it does not change the behavior in any way for GCC LTO or non-LTO cases.

danielleadams pushed a commit that referenced this pull request May 31, 2021
Bug: #38568
Test: manual,
      - arm64-apple-darwin20.5.0 / Apple clang version 12.0.5 (clang-1205.0.22.9)
      - x86_64-pc-linux-gnu / Ubuntu clang version 13.0.0-++20210520052624+48780527dd68-1~exp1~20210520153429.417
Signed-off-by: Jesse Chan <jc@linux.com>

PR-URL: #38751
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@danielleadams danielleadams mentioned this pull request May 31, 2021
codebytere added a commit to electron/electron that referenced this pull request Jun 24, 2021
richardlau pushed a commit that referenced this pull request Jul 16, 2021
Bug: #38568
Test: manual,
      - arm64-apple-darwin20.5.0 / Apple clang version 12.0.5 (clang-1205.0.22.9)
      - x86_64-pc-linux-gnu / Ubuntu clang version 13.0.0-++20210520052624+48780527dd68-1~exp1~20210520153429.417
Signed-off-by: Jesse Chan <jc@linux.com>

PR-URL: #38751
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
richardlau pushed a commit that referenced this pull request Jul 19, 2021
Bug: #38568
Test: manual,
      - arm64-apple-darwin20.5.0 / Apple clang version 12.0.5 (clang-1205.0.22.9)
      - x86_64-pc-linux-gnu / Ubuntu clang version 13.0.0-++20210520052624+48780527dd68-1~exp1~20210520153429.417
Signed-off-by: Jesse Chan <jc@linux.com>

PR-URL: #38751
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
richardlau pushed a commit that referenced this pull request Jul 20, 2021
Bug: #38568
Test: manual,
      - arm64-apple-darwin20.5.0 / Apple clang version 12.0.5 (clang-1205.0.22.9)
      - x86_64-pc-linux-gnu / Ubuntu clang version 13.0.0-++20210520052624+48780527dd68-1~exp1~20210520153429.417
Signed-off-by: Jesse Chan <jc@linux.com>

PR-URL: #38751
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@richardlau richardlau mentioned this pull request Jul 20, 2021
foxxyz pushed a commit to foxxyz/node that referenced this pull request Oct 18, 2021
Bug: nodejs#38568
Test: manual,
      - arm64-apple-darwin20.5.0 / Apple clang version 12.0.5 (clang-1205.0.22.9)
      - x86_64-pc-linux-gnu / Ubuntu clang version 13.0.0-++20210520052624+48780527dd68-1~exp1~20210520153429.417
Signed-off-by: Jesse Chan <jc@linux.com>

PR-URL: nodejs#38751
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants