LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 22452 - try linker target support instead of interrogating -v
Summary: try linker target support instead of interrogating -v
Status: RESOLVED WONTFIX
Alias: None
Product: compiler-rt
Classification: Unclassified
Component: compiler-rt (show other bugs)
Version: 3.6
Hardware: Macintosh MacOS X
: P normal
Assignee: Vitaly Buka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-03 20:55 PST by Michael Weiser
Modified: 2018-06-08 13:29 PDT (History)
6 users (show)

See Also:
Fixed By Commit(s):


Attachments
try linker instead of interrogating it (1.12 KB, patch)
2015-02-03 20:55 PST, Michael Weiser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weiser 2015-02-03 20:55:33 PST
Created attachment 13803 [details]
try linker instead of interrogating it

Older linker versions will not report supported targets in -v output while still supporting the target:

michael@osx105 ~/llvm $ ~/Gentoo/usr/i686-apple-darwin9/binutils-bin/4.2/ld64 -v
@(#)PROGRAM:ld  PROJECT:ld64-127.2 (Gentoo binutils-apple-4.2-r1)
LLVM version 3.5.1

This will make the Makefile drop all targets which in turn will make the lipo run fail and compile abort.

The attached patch makes clang_darwin.mk try to link a dylib from clang_darwin_test_input for the target to determine support. Tested against HEAD as of 2015-02-02.
Comment 1 Reid Kleckner 2015-02-04 14:32:56 PST
I think Bob is the one most invested in clang_darwin.mk.
Comment 2 Vitaly Buka 2018-06-08 13:29:57 PDT
Makefiles are gone.
If it's still relevant please file code review according to: https://llvm.org/docs/DeveloperPolicy.html#id13