[llvm-bugs] [Bug 28072] New: Compilation of a function in a large C++ project with -flto leads to bitcode files that can't be linked together with llvm-link

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jun 9 19:12:41 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28072

            Bug ID: 28072
           Summary: Compilation of a function in a large C++ project with
                    -flto leads to bitcode files that can't be linked
                    together with llvm-link
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: chris.schaf at verizon.net
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16504
  --> https://llvm.org/bugs/attachment.cgi?id=16504&action=edit
One of the bad bitcode files

I have a large project in which there is one function that when it's compiled
with -flto leads to a bitcode file that can't be llvm-link'd with other bitcode
files in the project.

When I do this:
llvm-link  -o clasp.lbc weakHashTable.cc.1.o.ll gcweak.cc.1.o.ll

I get this...
Referencing global in another module!
i64* @_ZN3reg16registered_classIPN4core3T_OEE2idE
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
i64* @_ZN3reg16registered_classIPN4core3T_OEE2idE
; ModuleID = 'llvm-link'
Referencing global in another module!
i64* @_ZN3reg16registered_classIN4core8Fixnum_IEE2idE
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
i64* @_ZN3reg16registered_classIN4core8Fixnum_IEE2idE
; ModuleID = 'llvm-link'
Referencing global in another module!
%"class.core::General_O"** @_ZN5boost6systemL14posix_categoryE.317
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
%"class.core::General_O"** @_ZN5boost6systemL14posix_categoryE.317
; ModuleID = 'llvm-link'
Referencing global in another module!
%"class.core::General_O"** @_ZN5boost6systemL10errno_ecatE.316
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
%"class.core::General_O"** @_ZN5boost6systemL10errno_ecatE.316
; ModuleID = 'llvm-link'
Referencing global in another module!
%"class.core::General_O"** @_ZN5boost6systemL11native_ecatE.315
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
%"class.core::General_O"** @_ZN5boost6systemL11native_ecatE.315
; ModuleID = 'llvm-link'
Referencing global in another module!
%"class.std::__1::basic_string"* @_ZL5ClPkg.314
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
%"class.std::__1::basic_string"* @_ZL5ClPkg.314
; ModuleID = 'llvm-link'
Referencing global in another module!
%"class.std::__1::basic_string"* @_ZN2clL10CurrentPkgE.313
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
%"class.std::__1::basic_string"* @_ZN2clL10CurrentPkgE.313
; ModuleID = 'llvm-link'
Referencing global in another module!
%"class.std::__1::basic_string"* @_ZL7CorePkg.312
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
%"class.std::__1::basic_string"* @_ZL7CorePkg.312
; ModuleID = 'llvm-link'
Referencing global in another module!
%"class.std::__1::basic_string"* @_ZN4coreL10CurrentPkgE.311
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
%"class.std::__1::basic_string"* @_ZN4coreL10CurrentPkgE.311
; ModuleID = 'llvm-link'
Referencing global in another module!
%"class.std::__1::basic_string"* @_ZL10KeywordPkg.310
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
%"class.std::__1::basic_string"* @_ZL10KeywordPkg.310
; ModuleID = 'llvm-link'
Referencing global in another module!
%"class.std::__1::basic_string"* @_ZN2kwL10CurrentPkgE.309
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
%"class.std::__1::basic_string"* @_ZN2kwL10CurrentPkgE.309
; ModuleID = 'llvm-link'
Referencing global in another module!
%"class.std::__1::basic_string"* @_ZL6ExtPkg.308
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
%"class.std::__1::basic_string"* @_ZL6ExtPkg.308
; ModuleID = 'llvm-link'
Referencing global in another module!
%"class.std::__1::basic_string"* @_ZN3extL10CurrentPkgE.307
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
%"class.std::__1::basic_string"* @_ZN3extL10CurrentPkgE.307
; ModuleID = 'llvm-link'
Referencing global in another module!
%"class.std::__1::basic_string"* @_ZL7CompPkg.306
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
%"class.std::__1::basic_string"* @_ZL7CompPkg.306
; ModuleID = 'llvm-link'
Referencing global in another module!
%"class.std::__1::basic_string"* @_ZN4compL10CurrentPkgE.305
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
%"class.std::__1::basic_string"* @_ZN4compL10CurrentPkgE.305
; ModuleID = 'llvm-link'
Referencing global in another module!
%"class.std::__1::basic_string"* @_ZL7ClosPkg.304
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
%"class.std::__1::basic_string"* @_ZL7ClosPkg.304
; ModuleID = 'llvm-link'
Referencing global in another module!
%"class.std::__1::basic_string"* @_ZN4closL10CurrentPkgE.303
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
%"class.std::__1::basic_string"* @_ZN4closL10CurrentPkgE.303
; ModuleID = 'llvm-link'
Referencing global in another module!
%"class.std::__1::basic_string"* @_ZL7GrayPkg.302
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
%"class.std::__1::basic_string"* @_ZL7GrayPkg.302
; ModuleID = 'llvm-link'
Referencing global in another module!
%"class.std::__1::basic_string"* @_ZN4grayL10CurrentPkgE.301
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
%"class.std::__1::basic_string"* @_ZN4grayL10CurrentPkgE.301
; ModuleID = 'llvm-link'
Referencing global in another module!
%"class.boost::detail::make_property_map_from_arg_pack_gen"*
@_ZN5boost6detailL28make_color_map_from_arg_packE.300
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
%"class.boost::detail::make_property_map_from_arg_pack_gen"*
@_ZN5boost6detailL28make_color_map_from_arg_packE.300
; ModuleID = 'llvm-link'
Referencing global in another module!
i64* @_ZN3reg16registered_classIN4core8Symbol_OEE2idE
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
i64* @_ZN3reg16registered_classIN4core8Symbol_OEE2idE
; ModuleID = 'llvm-link'
Referencing global in another module!
i64* @_ZN3reg16registered_classIN4core3T_OEE2idE
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
i64* @_ZN3reg16registered_classIN4core3T_OEE2idE
; ModuleID = 'llvm-link'
Referencing global in another module!
i64* @_ZN3reg16registered_classIN4core15SourcePosInfo_OEE2idE
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
i64* @_ZN3reg16registered_classIN4core15SourcePosInfo_OEE2idE
; ModuleID = 'llvm-link'
Referencing global in another module!
i64* @_ZN3reg16registered_classIN4core6Real_OEE2idE
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
i64* @_ZN3reg16registered_classIN4core6Real_OEE2idE
; ModuleID = 'llvm-link'
Referencing global in another module!
i64* @_ZN3reg16registered_classIN4core8Number_OEE2idE
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
i64* @_ZN3reg16registered_classIN4core8Number_OEE2idE
; ModuleID = 'llvm-link'
Referencing global in another module!
i64* @_ZN3reg16registered_classIN4core9Integer_OEE2idE
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
i64* @_ZN3reg16registered_classIN4core9Integer_OEE2idE
; ModuleID = 'llvm-link'
Referencing global in another module!
i64* @_ZN3reg16registered_classIN4core13DoubleFloat_OEE2idE
; ModuleID =
'/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o'
i64* @_ZN3reg16registered_classIN4core13DoubleFloat_OEE2idE
; ModuleID = 'llvm-link'
All DICompileUnits must be listed in llvm.dbg.cu
llvm-link:
/Users/meister/Development/clasp/wbuild/clasp_boehm_o/src/core/weakHashTable.cc.1.o:
error: input module is broken!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160610/7688db78/attachment-0001.html>


More information about the llvm-bugs mailing list