Skip to content

Fix native-compiler detection in ocamltest#10074

Merged
xavierleroy merged 1 commit intoocaml:trunkfrom
shindere:fix-ocamltest-native-compiler-support
Dec 7, 2020
Merged

Fix native-compiler detection in ocamltest#10074
xavierleroy merged 1 commit intoocaml:trunkfrom
shindere:fix-ocamltest-native-compiler-support

Conversation

@shindere
Copy link
Copy Markdown
Contributor

@shindere shindere commented Dec 7, 2020

this PR is a follow-up to commit 42efb99

Before that commit, it was possible to determine whether the
native-compiler was disabled by comparing the ARCH build variable with
the "none" string. This trick was used by ocamltest to figure out
whether the native compilers were available or not, because at the time
when ocamltest had to be made aware of that, this was the only way
to do (there was no build variable to keep track explictly of whether
the native compilers were enabled or not at that time, the explicit
build variable was introduced later).

So, the commit mentionned above actually broke ocamltest, causing it to
try (and fail) to run the native compilers when they were disabled
at configure time.

The present PR fixes this by making ocamltest rely on the appropriate
build variable since it has become available meanwhile.

@xavierleroy: this should help our other-configs CI jobs.

this is a follow-up to commit 42efb99

Before that commit, it was possible to determine whether the
native-compiler was disabled by comparing the ARCH build variable with
the "none" string. This trick was used by ocamltest to figure out
whether the native compilers were available or not, because at the time
when ocamltest had to be made aware of that, this was the only way
to do (there was no build variable to keep track explictly of whether
the native compilers were enabled or not at that time, the explicit
build variable was introduced later).

So, the commit mentionned above actually broke ocamltest, causing it to
try (and fail) to run the native compilers when they were disabled
at configure time.

The present commit fixes this by making ocamltest rely on the appropriate
build variable since it has become available meanwhile.
Copy link
Copy Markdown
Member

@gasche gasche left a comment

Choose a reason for hiding this comment

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

With your explanation, the patch is easy to read and clearly correct. Approved.

@xavierleroy
Copy link
Copy Markdown
Contributor

This elucidates the mystery of the CI failing on the "pure bytecode" configuration. Thanks a lot!

@shindere
Copy link
Copy Markdown
Contributor Author

shindere commented Dec 7, 2020 via email

@xavierleroy xavierleroy merged commit 128d12c into ocaml:trunk Dec 7, 2020
@xavierleroy
Copy link
Copy Markdown
Contributor

I merged in trunk. If #10044 is cherry-picked to 4.12, this PR must also be cherry-picked.

@Octachron
Copy link
Copy Markdown
Member

It is (3248b86).

dra27 pushed a commit that referenced this pull request Dec 7, 2020
this is a follow-up to commit 42efb99

Before that commit, it was possible to determine whether the
native-compiler was disabled by comparing the ARCH build variable with
the "none" string. This trick was used by ocamltest to figure out
whether the native compilers were available or not, because at the time
when ocamltest had to be made aware of that, this was the only way
to do (there was no build variable to keep track explictly of whether
the native compilers were enabled or not at that time, the explicit
build variable was introduced later).

So, the commit mentionned above actually broke ocamltest, causing it to
try (and fail) to run the native compilers when they were disabled
at configure time.

The present commit fixes this by making ocamltest rely on the appropriate
build variable since it has become available meanwhile.

(cherry picked from commit 128d12c)
@dra27
Copy link
Copy Markdown
Member

dra27 commented Dec 7, 2020

Oops, sorry about that @shindere. #10044 is indeed on 4.12 and I just cherry-picked this PR there too (9f44e57)

@shindere
Copy link
Copy Markdown
Contributor Author

shindere commented Dec 7, 2020 via email

@dra27
Copy link
Copy Markdown
Member

dra27 commented Dec 7, 2020

Only those who don't do anything don't do anything wrong. ;-)

:-D

@shindere shindere deleted the fix-ocamltest-native-compiler-support branch January 12, 2021 17:25
dbuenzli pushed a commit to dbuenzli/ocaml that referenced this pull request Mar 25, 2021
this is a follow-up to commit 42efb99

Before that commit, it was possible to determine whether the
native-compiler was disabled by comparing the ARCH build variable with
the "none" string. This trick was used by ocamltest to figure out
whether the native compilers were available or not, because at the time
when ocamltest had to be made aware of that, this was the only way
to do (there was no build variable to keep track explictly of whether
the native compilers were enabled or not at that time, the explicit
build variable was introduced later).

So, the commit mentionned above actually broke ocamltest, causing it to
try (and fail) to run the native compilers when they were disabled
at configure time.

The present commit fixes this by making ocamltest rely on the appropriate
build variable since it has become available meanwhile.
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.

5 participants