Xcode 4.3 moved libprofile_rt, how to reference it now?

  • Hi all,

    In Xcode 4.2, libprofile_rt was found here:

    /Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/libprofile_rt.a
    /Deveroper/Platforms/iPhoneOS.platform/Developer/usr/lib/libprofile_rt.dylib
    /usr/lib/libprofile_rt.a
    /usr/lib/libprofile_rt.dylib

    In Xcode 4.3, with /Developer gone, it's now found here:

    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/libprofile_rt.a
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/libprofile_rt.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libprofile_rt.a
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libprofile_rt.dylib

    How am I supposed to reference this thing?  (for Mac OS)

    Previously, I was adding $DEVELOPER_USR_DIR/lib to my LIBRARY_SEARCH_PATHS and -lprofile_rt to my OTHER_LDFLAGS but now in 4.3 this is broken since $DEVELOPER_USR_DIR doesn't resolve to this 'Toolchains' folder.

    Thanks,

    --
    ____________________________________________________________
    Sean McBride, B. Eng                <sean...>
    Rogue Research                        www.rogue-research.com
    Mac Software Developer              Montréal, Québec, Canada
  • Le 7 mars 2012 à 21:24, Sean McBride a écrit :

    > Hi all,
    >
    > In Xcode 4.2, libprofile_rt was found here:
    >
    > /Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/libprofile_rt.a
    > /Deveroper/Platforms/iPhoneOS.platform/Developer/usr/lib/libprofile_rt.dylib
    > /usr/lib/libprofile_rt.a
    > /usr/lib/libprofile_rt.dylib
    >
    > In Xcode 4.3, with /Developer gone, it's now found here:
    >
    > /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/libprofile_rt.a
    > /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/libprofile_rt.dylib
    > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libprofile_rt.a
    > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libprofile_rt.dylib
    >
    > How am I supposed to reference this thing?  (for Mac OS)
    >
    > Previously, I was adding $DEVELOPER_USR_DIR/lib to my LIBRARY_SEARCH_PATHS and -lprofile_rt to my OTHER_LDFLAGS but now in 4.3 this is broken since $DEVELOPER_USR_DIR doesn't resolve to this 'Toolchains' folder.

    You shouldn't  have to reference it explicitly. The clang driver take care of adding libprofile_rt to the linker invocation when needed, just like it takes care of libclang_rt.
    What compiler options that require this library are you using ?

    -- Jean-Daniel
  • On Thu, 8 Mar 2012 13:24:27 +0100, Jean-Daniel Dupas said:

    > You shouldn't  have to reference it explicitly. The clang driver take
    > care of adding libprofile_rt to the linker invocation when needed, just
    > like it takes care of libclang_rt.
    > What compiler options that require this library are you using ?

    My impression was that it did have to be referenced explicitly.  With Xcode+gcc you always had to explicitly add libgcov to the linker options, this gave me the impression the same was needed with clang:
    <http://llvm.org/bugs/show_bug.cgi?id=8030>

    You are quite correct though, with both 4.2.1 and 4.3 setting:

    GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES
    GCC_GENERATE_TEST_COVERAGE_FILES = YES

    is sufficient.

    Thanks!

    --
    ____________________________________________________________
    Sean McBride, B. Eng                <sean...>
    Rogue Research                        www.rogue-research.com
    Mac Software Developer              Montréal, Québec, Canada
previous month march 2012 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
Go to today