After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 782296 - Update the list of llvm-config names to include svn trunk on Debian
Update the list of llvm-config names to include svn trunk on Debian
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: plugins
3.25.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-07 13:46 UTC by Ting-Wei Lan
Modified: 2017-05-08 22:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: allow building with llvm svn trunk on Debian (933 bytes, patch)
2017-05-07 13:46 UTC, Ting-Wei Lan
none Details | Review
build: move llvm-config to the top (1.24 KB, patch)
2017-05-07 15:34 UTC, Ting-Wei Lan
committed Details | Review
build: allow building with llvm 4.0 and svn trunk (1.53 KB, patch)
2017-05-07 15:34 UTC, Ting-Wei Lan
committed Details | Review
meson-build: fix the libclang check (1.76 KB, patch)
2017-05-07 15:34 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2017-05-07 13:46:02 UTC
I found commit 0ca0a3e moved llvm 4.0 to the top. This is correct because it became a stable release, but it didn't keep the svn trunk version on Debian (llvm-config-5.0) in the list.

FreeBSD uses the name 'llvm-config-devel', so we don't have to add llvm-config50 unless it becomes a stable release.
Comment 1 Ting-Wei Lan 2017-05-07 13:46:45 UTC
Created attachment 351297 [details] [review]
build: allow building with llvm svn trunk on Debian
Comment 2 Patrick Griffis (tingping) 2017-05-07 14:14:45 UTC
Don't forget the meson.build file too.
Comment 3 Ting-Wei Lan 2017-05-07 15:34:25 UTC
Created attachment 351308 [details] [review]
build: move llvm-config to the top

If llvm-config exists, it should be the default LLVM version on the
system and we should use it by default. This change also syncs the
list with meson.
Comment 4 Ting-Wei Lan 2017-05-07 15:34:32 UTC
Created attachment 351309 [details] [review]
build: allow building with llvm 4.0 and svn trunk
Comment 5 Ting-Wei Lan 2017-05-07 15:34:45 UTC
Created attachment 351310 [details] [review]
meson-build: fix the libclang check

Use args argument in cc.has_header because it doesn't support prefix.

Add dirs argument to cc.find_library because we have to add extra
search paths to find libclang on systems not installing it in the
default search path. Replace 'llvm-config --ldflags' with
'llvm-config --libdir' because cc.find_library uses dirs argument
instead of args.

Remove link_args from clang_dep because using cc.find_library makes
meson use the full path to the library. -L flags are not needed here.
Comment 6 Ting-Wei Lan 2017-05-07 15:36:39 UTC
The last patch is build-tested by manually modifying the generated build.ninja file because meson incorrectly reorders my LDFLAGS (https://github.com/mesonbuild/meson/issues/1718).
Comment 7 Patrick Griffis (tingping) 2017-05-07 16:41:41 UTC
Also for what its worth next Meson release will handle llvm itself: https://github.com/mesonbuild/meson/commit/4bee51655bea9c8bebd3c55414d7daf13591fb59
Comment 8 Christian Hergert 2017-05-08 22:15:52 UTC
We should simplify to use meson's new LLVMDependency once that is read. But LGTM for now.

Attachment 351308 [details] pushed as 891a575 - build: move llvm-config to the top
Attachment 351309 [details] pushed as 903498b - build: allow building with llvm 4.0 and svn trunk
Attachment 351310 [details] pushed as 4319ce5 - meson-build: fix the libclang check