Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.

Conversation

@HidenoriMatsubayashi
Copy link
Member

@HidenoriMatsubayashi HidenoriMatsubayashi commented Nov 13, 2020

Background

In the clang_x86 and clang_x64 building, buildroot has been using readelf/nm/ar/strip commands of a host that executes the build without using the toolchain's. However, it is odd to use gcc in the host environment even though it uses clang / llvm.

It looks like Dart is using llvm-objcopy for clang_x64 as well, so we should investigate whether to unify that at some point on our side, but limiting the changes to just arm64 here is the safer option.

#390 (review)

Changes

I investigated the past commit history of dart-sdk and flutter. I guess that the cause is that the changes of dart-sdk are not imported to flutter-engine.

dart-sdk was changed from gcc to clang/llvm by this PR on 21 May 2017. However, there isn't any changes in flutter. I don't think it's the critical problem, but I think it's better to modify the toolchain according to dart-sdk.

clang_x64 and clang_x86

Changed readelf, nm, ar, strip(llvm_objcopy) commands from gcc to clang/llvm. The source code is the same with dart-sdk's.
https://github.com/dart-lang/sdk/blob/master/build/toolchain/linux/BUILD.gn

x64 and x86

Formally, there isn't any changes without adding strip command. I just changed the code according to dart-sdk.

Test

The tests in the CI passed.
flutter/engine#22484

Hidenori Matsubayashi added 2 commits November 12, 2020 17:40
Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

LGTM

@dnfield dnfield merged commit 91f309f into flutter:master Jan 12, 2021
@HidenoriMatsubayashi
Copy link
Member Author

Thank you for your review.

chinmaygarde pushed a commit to chinmaygarde/flutter_buildroot that referenced this pull request May 4, 2021
* Change readelf, nm, readelf, etc path in clang_x86/clang_x64.
Change to match dart-sdk in x86/x64.

* format
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants