Skip to content

Conversation

@lriggs
Copy link
Contributor

@lriggs lriggs commented Jan 30, 2026

Rationale for this change

LLVM 15 or earlier uses llvm::Optional not std::optional.

What changes are included in this PR?

Use llvm::Optional with LLVM 15 or earlier.

Are these changes tested?

Yes, compiling.

Are there any user-facing changes?

No

@github-actions
Copy link

⚠️ GitHub issue #49087 has been automatically assigned in GitHub to PR creator.

@raulcd raulcd added the CI: Extra: Package: Linux Run extra Linux Packages CI label Jan 31, 2026
@kou kou changed the title GH-49087 [CI][Packaging][Gandiva] Some of our Linux packaging jobs fa… GH-49087 [CI][Packaging][Gandiva] Add support for LLVM 15 or earlier again Jan 31, 2026
@github-actions
Copy link

⚠️ GitHub issue #49087 has been automatically assigned in GitHub to PR creator.

1 similar comment
@github-actions
Copy link

⚠️ GitHub issue #49087 has been automatically assigned in GitHub to PR creator.

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1

Comment on lines +233 to +237
#if LLVM_VERSION_MAJOR >= 16
jit_builder.setDataLayout(std::make_optional(data_layout));
#else
jit_builder.setDataLayout(llvm::Optional<llvm::DataLayout>(data_layout));
#endif
Copy link
Member

Choose a reason for hiding this comment

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

This may work:

Suggested change
#if LLVM_VERSION_MAJOR >= 16
jit_builder.setDataLayout(std::make_optional(data_layout));
#else
jit_builder.setDataLayout(llvm::Optional<llvm::DataLayout>(data_layout));
#endif
jit_builder.setDataLayout(data_layout);

@kou kou merged commit 235841d into apache:main Jan 31, 2026
87 of 88 checks passed
@kou kou removed the awaiting review Awaiting review label Jan 31, 2026
@github-actions github-actions bot added awaiting review Awaiting review awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants