Skip to content

Comments

Add libonly meson option#1348

Open
rkd77 wants to merge 1 commit intoquickjs-ng:masterfrom
rkd77:djgpp
Open

Add libonly meson option#1348
rkd77 wants to merge 1 commit intoquickjs-ng:masterfrom
rkd77:djgpp

Conversation

@rkd77
Copy link
Contributor

@rkd77 rkd77 commented Feb 12, 2026

Mainly for DJGPP. I don't need qjs.exe, libc. etc. only library.
Check for threads adds -pthread to flags, which cause compilation error, so it is disabled for 'dos' host_system.
Executables are replaced by text '/bin/true'. It does not break normal builds.

option('cli_mimalloc', type: 'feature', value: 'disabled', description: 'build qjs cli with mimalloc')
option('docdir', type: 'string', description: 'documentation directory')
option('parser', type: 'boolean', value: true, description: 'Enable JS source code parser')
option('libonly', type: 'boolean', value: false, description: 'Build qjs library only')
Copy link

Choose a reason for hiding this comment

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

It's probably better to have a

option('tools', type: 'feature', description: 'build tools like qjs and qjsc')

as libonly is a really weird option name IMHO.

Copy link
Contributor

Choose a reason for hiding this comment

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

Idn't there a convention projects using meson use?

Copy link
Contributor

@BalkanMadman BalkanMadman Feb 16, 2026

Choose a reason for hiding this comment

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

'tools' seems a bit more natural to me. That's what we use in Gentoo to denote binaries that come with projects that are primarily used as libraries. e.g. see this: https://packages.gentoo.org/useflags/search?q=tools

@BalkanMadman
Copy link
Contributor

BalkanMadman commented Feb 16, 2026

I'd suggest forcing building the binaries if tests are enabled. For instance, if you disable 'tools' and enable tests, you can build but not install the binaries.

@BalkanMadman
Copy link
Contributor

Please, include only the relevant commits. d31c087 and e9cf7d8 should not be included in this PR.

Please rebase your branch and remove these commits.

@BalkanMadman
Copy link
Contributor

Additionally, please describe your changes in the commit messages in a bit greater detail, as, for example, described here:

The first line of the commit message should be a short description (50 characters is the soft limit), and should skip the full stop. It is also conventional in most cases to prefix the first line with "area: " where the area is a filename or identifier for the general area of the code being modified, e.g.

  • doc: clarify distinction between sign-off and pgp-signing
  • githooks.txt: improve the intro section

In this case, something like meson: Add 'tools' option to toggle build/installation of binaries should be good! Also, please do all the changes in one commit because this PR is logically one change (so should be one commit). You can merge the contents of multiple commits together by squashing them during a rebase.

Also:
a) do not check dependecy 'threads' in 'dos' build (No -pthread in djgpp)
b) replace qjsc_exe by 'qjsc' in codegen targets. qjsc_exe compiles
quickjs-libc.c
@rkd77
Copy link
Contributor Author

rkd77 commented Feb 16, 2026

I already have 3 commits. Is it possible to squashed them to 1 without closing merge request?

@rkd77
Copy link
Contributor Author

rkd77 commented Feb 16, 2026

I'd suggest forcing building the binaries if tests are enabled. For instance, if you disable 'tools' and enable tests, you can build but not install the binaries.

How to do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants