Open DAC324 opened 2 years ago
How did you actually replace ld.lld
with mold
? As far as I know, chromium repo contains its original copy of ld.lld
. Did you overwrite it?
There's an internal variable _lld in the PKGBUILD that is simply set to "ld.lld" and its contents is passed to the -fuse option when calling clang. I simply tried replacing the "ld.lld" entry there so that clang is called with -fuse="/usr/bin/mold" instead of -fuse="ld.lld" but for some unknown reason, that doesn't work.
Am 26. Dezember 2021 12:12:32 schrieb Rui Ueyama @.***>:
How did you actually replace ld.lld with mold? As far as I know, chromium repo contains its original copy of ld.lld. Did you overwrite it? — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>
There's an internal variable _lld in the PKGBUILD that is simply set to "lld.ld" and its contents is passed to the -fuse option when calling clang. I simply tried replacing the "lld.ld" entry there so that clang is called with -fuse="/usr/bin/mold" instead of -fuse="lld.ld" but for some unknown reason, that doesn't work. Am 26. Dezember 2021 12:12:32 schrieb Rui Ueyama @.>: … How did you actually replace ld.lld with mold? As far as I know, chromium repo contains its original copy of ld.lld. Did you overwrite it? — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.>
I will maybe try later also a build. Maybe also check this line: There are two lines regarding the linker: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=chromium-dev#n476 https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=chromium-dev#n572
The only problem i see, if there is anything built with lto, it will issue the build. I will let you know.
Edit:
Also we should watch the patches about any changes are done regarding linking/ltoing ?
And one more thing: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=chromium-dev#n610
There's an internal variable lld in the PKGBUILD that is simply set to "ld.lld" and its contents is passed to the -fuse option when calling clang. I simply tried replacing the "ld.lld" entry there so that clang is called with -fuse="/usr/bin/mold" instead of -fuse="ld.lld" but for some unknown reason, that doesn't work. Am 26. Dezember 2021 12:12:32 schrieb Rui Ueyama @.>: … How did you actually replace ld.lld with mold? As far as I know, chromium repo contains its original copy of ld.lld. Did you overwrite it? — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: _@_._>
I will maybe try later also a build. Maybe also check this line: There are two lines regarding the linker: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=chromium-dev#n476 https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=chromium-dev#n572
Indeed, these two lines appear to be connected to each other. If I am not mistaken, it should be sufficient to replace
_lld="ld.lld"
with _lld="/usr/bin/mold"
in line 476, and the contents of this variable is then inserted via the sed
command in the build files.
The only problem i see, if there is anything built with lto, it will issue the build. I will let you know.
Edit:
Also we should watch the patches about any changes are done regarding linking/ltoing ?
And one more thing: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=chromium-dev#n610
Yes, I saw that as well but did not understand why clang is apparently chosen as a linker here.
Finally, I didn't want to cause any inconvenience - I just saw the example GIF which refers to Chromium, and hence, I was wondering how I could use mold
in the AUR package as well.
Kind regards, DAC324
Alright, thanks. Sincee for chromium based browsers, if compiling them much (often), like me at a repo, the linker couldd definitly help.
Can you post me here the link? Would it possible to do for ungoogled-chromium also one?
Regards.
Sincee for chromium based browsers, if compiling them much (often), like me at a repo, the linker couldd definitly help.
Can you post me here the link? Would it possible to do for ungoogled-chromium also one?
At first, I use https://gsdview.appspot.com/chromium-browser-official/?marker=chromium-99.0.4789.0-testdata.tar.x%40 to see which version is the latest with available sources.
Then, I use the chromium-dev
AUR package at https://aur.archlinux.org/packages/chromium-dev/, editing PKGBUILD
to use the latest version identified in the first link. There is the pkgver
variable at the very beginning of PKGBUILD
where you can enter the chromium
version you want to build.
For ungoogled-chromium
, I'd strongly recommend using the version proposed in PKGBUILD
as this package does heavily patching and all the patches are carefully tweaked to work with that particular version. You can find ungoogled-chromium
at https://aur.archlinux.org/packages/ungoogled-chromium/
Kind regards, DAC324
@DAC324 Yes, i know how a PKGBUILD works. I just when you got it working with mold to run that, that you can post the PKGBUILD.
Regards.
Meanwhile, the chromium
developers have clearly committed themselves to not support building chromium
with mold
: https://bugs.chromium.org/p/chromium/issues/detail?id=1280356#c1
Apparently as a consequence, they are now blocking mold
as with the latest (as of today) chromium
development version 104.0.5099.0, it is not possible to get a working flatc
binary anymore:
flatc: malloc.c:4302: _int_malloc: Assertion `(unsigned long) (size) >= (unsigned long) (nb)' failed.
Thus, all flatc
calls during the build process fail, and chromium
cannot be built.
Is it about the same topic as #336? If so, I would like to close this in favor of that issue.
Hello,
I just tried to replace
ld.lld
bymold
in thechromium-dev
AUR package. Looks like this is not possible as easy as described in the instructions. Whenld.lld
is replaced by/usr/bin/mold
as per instructions,configure
forchromium-dev
fails:So it looks like simply replacing
ld.lld
bymold
is not enough. Perhaps there are additional configuration steps necessary.