Skip to content
Snippets Groups Projects
  • Pirama Arumuga Nainar's avatar
    9ecbd6eb
    Reorder static libs to appease ld.gold linker · 9ecbd6eb
    Pirama Arumuga Nainar authored
    Bug: http://b/112277682
    Bug: http://b/79419131
    
    Lld, which is the default linker for the platform, is able to resolve
    symbols across libraries irrespective of the order they appear in the
    command line.  This was not the case for ld.gold and other linkers.
    Unfortunately, there are some targets that still rely on ld.gold
    (pgo-taimen-config1 in internal release branch being one of
    them).
    
    With http://aosp/721652, libbt-stack should be added before libbt-common
    so MessageLoopThread::~MessageLoopThread is resolved correctly.  If not,
    the following error is reported by gold:
    
    system/bt/stack/btu/btu_init.cc:41: error: undefined reference to
    'bluetooth::common::MessageLoopThread::MessageLoopThread(std::__1::basic_string<char,
    std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
    
    Test: m USE_CLANG_LLD=false
    Change-Id: I9c8208218ffb4bb027ad75b51bcd484e9bb37368
    9ecbd6eb
    History
    Reorder static libs to appease ld.gold linker
    Pirama Arumuga Nainar authored
    Bug: http://b/112277682
    Bug: http://b/79419131
    
    Lld, which is the default linker for the platform, is able to resolve
    symbols across libraries irrespective of the order they appear in the
    command line.  This was not the case for ld.gold and other linkers.
    Unfortunately, there are some targets that still rely on ld.gold
    (pgo-taimen-config1 in internal release branch being one of
    them).
    
    With http://aosp/721652, libbt-stack should be added before libbt-common
    so MessageLoopThread::~MessageLoopThread is resolved correctly.  If not,
    the following error is reported by gold:
    
    system/bt/stack/btu/btu_init.cc:41: error: undefined reference to
    'bluetooth::common::MessageLoopThread::MessageLoopThread(std::__1::basic_string<char,
    std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
    
    Test: m USE_CLANG_LLD=false
    Change-Id: I9c8208218ffb4bb027ad75b51bcd484e9bb37368
Code owners
Assign users and groups as approvers for specific file changes. Learn more.