Skip to content

Parse endian-dependent BPF architecture. #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 3, 2020

Conversation

sjavora
Copy link
Contributor

@sjavora sjavora commented Jan 2, 2020

Taken from LLVM.

@@ -574,10 +574,12 @@ extension Triple {
}

private static func parseBPFArch<S: StringProtocol>(_ archName: S) -> Triple.Arch? {

let isLittleEndianHost = 1.littleEndian == 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Depending on what stance the project takes on using private language features, we could use #if _endian(little) here. The driver already uses @_exported and @_implementationOnly elsewhere, but on the other hand it might make a bootstrapped build more difficult in the future.

Copy link
Member

Choose a reason for hiding this comment

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

We'd prefer to use the public language if we can, so let's stick with this.

@@ -574,10 +574,12 @@ extension Triple {
}

private static func parseBPFArch<S: StringProtocol>(_ archName: S) -> Triple.Arch? {

let isLittleEndianHost = 1.littleEndian == 1
Copy link
Member

Choose a reason for hiding this comment

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

We'd prefer to use the public language if we can, so let's stick with this.

@DougGregor
Copy link
Member

@swift-ci please test

@DougGregor DougGregor merged commit 44bc7a9 into swiftlang:master Jan 3, 2020
@sjavora sjavora deleted the bpf-endianness branch January 18, 2020 11:56
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.

3 participants