This is an archive of the discontinued LLVM Phabricator instance.

Add Triple::isOSUnknown
ClosedPublic

Authored by sbc100 on Oct 24 2017, 1:29 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

sbc100 created this revision.Oct 24 2017, 1:29 PM
sbc100 edited the summary of this revision. (Show Details)Oct 24 2017, 1:30 PM
sbc100 added a reviewer: dschuff.
sbc100 added a subscriber: llvm-commits.
dschuff edited edge metadata.Oct 24 2017, 1:46 PM

I don't necessarily object to this accessor.
But for our generic non-emscripten toolchain support that we are adding right now, maybe we should make it have whatever defaults we are building now with any OS (not just explicitly "unknown")?

Can you explain a little more? What defaults are we building now?

D39218 uses the path we want want if the OS is 'unknown'. But shouldn't we make it so that any 'wasm-*-*' triple behaves the same way? i.e. someone who wants to put their own OS name in there but wants to use that same layout (or for that matter, maybe we want to adopt that in emscripten too).

Hmm.. i'm not sure I understand why one might want to put a non-"unkown" OS string in there. What would that mean exactly? And if you did want to that it seems reasonable that at the very least you compile your own version of libclangrt, no?

If you wanted to come up with your own set of syscalls or lower-layer stuff, You'd basically be making up your own OS, which you could name. But libclangrt.builtins in particular doesn't really depend on the OS, it's mostly just architecture-specific or processor-specific stuff. So you could reuse the clang support for that.

Anyway I didn't mean to hold up this little CL over that; just an observation.

dschuff accepted this revision.Oct 24 2017, 3:10 PM
This revision is now accepted and ready to land.Oct 24 2017, 3:10 PM

I see what you mean, but currently the libclant_rt.* libraries are segmented by "OS", so we are simply following that (perhaps broken) pattern for now.

This revision was automatically updated to reflect the committed changes.