Skip to content

build: buildinfo.txt improvements - #14822

Closed
vszakats wants to merge 17 commits into
curl:masterfrom
vszakats:buildinfo-tweaks
Closed

vszakats wants to merge 17 commits into
curl:masterfrom
vszakats:buildinfo-tweaks

Conversation

@vszakats

@vszakats vszakats commented Sep 7, 2024 •

Copy link
Copy Markdown
Member
  • cmake: drop configure.os.
    This also includes OS version, but thus far it's not important enough
    to include it.
  • autotools: drop redundant, autotools-only {target|host}.vendor.
    (it's part of the triplet in {target|host}.)
  • swap order to *.cpu → *.os to match triplet-order.
  • cmake: drop redundant target.
    It's manually filled and only in a (so far) few CI jobs. Let's revisit
    when this becomes useful.
  • move buildinfo.txt to build root.
  • dist: add buildinfo.txt to DISTCLEANFILES.
  • autotools: detect human readable compiler version.
  • autotools: replace XXYY compiler.version with "X.Y"-style.
    (also to match cmake.)
  • autotools: use distinct compiler_id for Apple clang: APPLECLANG.
    To match cmake and also because the the "X.Y"-style version number
    is the Apple version, while XXYY was a value roughly translated to
    mainline llvm/clang version.
  • show buildinfo at the end of the configure stage, when run in CI, or
    when CURL_BUILDINFO or CURL_CI env is set.

Follow-up to 1fdea16 #14802
Assisted-by: Dan Fandrich
Ref: #14802 (comment)


/cc @dfandrich

@vszakats vszakats changed the title buildinfo: improvements buildinfo: various improvements Sep 7, 2024
@vszakats vszakats changed the title buildinfo: various improvements build: various buildinfo.txt improvements Sep 7, 2024

@dfandrich dfandrich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

From a Test Clutch perspective, this looks fine—it's not using any of the fields that have been removed. I'm thinking now that maybe it makes sense to include {host,target}.{os,cpu} in the autoconf output, even if it's redundant, since those two fields are both common to AC and CM and there easier for others to use.

Also, please coordinate with me before submitting this since the change of semantics in compiler.version in AC will need some work in Test Clutch to avoid storing inconsistent data.

@dfandrich

Copy link
Copy Markdown
Contributor

Actually, Test Clutch now automatically figures out which format of compiler version it is, so submit at your leisure.

@vszakats

vszakats commented Sep 7, 2024

Copy link
Copy Markdown
Member Author

Thanks Dan! I'm also fine including the fined grained cpu/os fields always. Makes parsing a little bit easier.

I'm thinking to make buildtest.txt visible at the end of the configure process, maybe on condition of running in CI. It'd help seeing this info early in the build, also in jobs without tests. This in turn helps seeing if detection is working as expected, and helps navigating codepaths in both configure and CMake. It could be put under a GHA fold if seen too verbose. It is partially redundant, but has the advantage of having all this info in one block, and regardless of build tool. Or is that overkill?

@dfandrich

dfandrich commented Sep 7, 2024 via email

Copy link
Copy Markdown
Contributor

@vszakats
vszakats force-pushed the buildinfo-tweaks branch 2 times, most recently from 5efaeec to c708b35 Compare September 10, 2024 09:21
@vszakats

vszakats commented Sep 10, 2024 •

Copy link
Copy Markdown
Member Author

Added a buildinfo.sysroot field. It's not perfect because configure relies on the caller setting this (as in GHA/macos), but cmake does detect it on macOS. It shows the Apple SDK version, and sometimes Xcode version. It's also platform-agnostic but other platforms would likely just reflect any (semi-)manual setting. Probably not important enough to include in the testclutch matrix, but can be a useful datapoint for builds in general.

@vszakats vszakats changed the title build: various buildinfo.txt improvements build: buildinfo.txt improvements Sep 12, 2024
@vszakats vszakats closed this in 50e2cb5 Sep 19, 2024
@vszakats
vszakats deleted the buildinfo-tweaks branch September 19, 2024 13:57
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
- cmake: drop `configure.os`.
  This also includes OS version, but thus far it's not important enough
  to include it.
- autotools: drop redundant, autotools-only `{target|host}.vendor`.
  (it's part of the triplet in `{target|host}`.)
- swap order to `*.cpu` -> `*.os` to match triplet-order.
- cmake: drop redundant `target`.
  It's manually filled and only in a (so far) few CI jobs. Let's revisit
  when this becomes useful.
- move `buildinfo.txt` to build root.
- dist: add `buildinfo.txt` to `DISTCLEANFILES`.
- autotools: detect human readable compiler version.
- autotools: replace `XXYY` `compiler.version` with "X.Y"-style.
  (also to match cmake.)
- autotools: use distinct `compiler_id` for Apple clang: `APPLECLANG`.
  To match cmake and also because the the "X.Y"-style version number
  is the Apple version, while `XXYY` was a value roughly translated to
  mainline llvm/clang version.
- show buildinfo at the end of the configure stage, when run in CI, or
  when `CURL_BUILDINFO` or `CURL_CI` env is set.

Follow-up to 1fdea16 curl#14802
Assisted-by: Dan Fandrich
Ref: curl#14802 (comment)
Closes curl#14822
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants