@@ -24,50 +24,60 @@ project
2424 <warnings>all
2525 <debug-symbols>on
2626 <test-info>always_show_run_output
27- <target-os>linux:<cxxflags>"-fvisibility=hidden"
2827 ;
2928
29+ local RDYNAMIC = <target-os>freebsd:<linkflags>"-rdynamic" <target-os>solaris:<linkflags>"-Bdynamic" <target-os>aix:<linkflags>"-rdynamic"
30+ <target-os>qnxnto,<toolset>qcc:<linkflags>"-Bdynamic" <target-os>qnxnto,<toolset>gcc:<linkflags>"-rdynamic"
31+ <target-os>android:<linkflags>"-rdynamic" <target-os>linux:<linkflags>"-rdynamic" <target-os>darwin,<toolset>gcc:<linkflags>"-dynamic"
32+ <target-os>darwin,<toolset>clang:<linkflags>"-rdynamic" <target-os>iphone:<linkflags>"-rdynamic" ;
3033
31- local BT_DEPS = <target-os>linux:<library>dl <library>backtrace [ check-target-builds ../build//libbacktrace : : <build>no ] ;
32- local UNWD_DEPS = <target-os>linux:<library>dl [ check-target-builds ../build//addr2line : : <build>no ] ;
33- local WIND_DEPS = <library>Dbghelp [ check-target-builds ../build//WinDbg : : <build>no ] ;
34- local NOOP_DEPS = ;
35- local AUTO_DEPS = <target-os>linux:<library>dl [ check-target-builds ../build//WinDbg : <library>Dbghelp ] ;
34+ local HIDE_SYMBS = <target-os>linux:<cxxflags>"-fvisibility=hidden" ;
3635
37- local LINKSHARED_BT = <link>shared <define>BOOST_STACKTRACE_DYN_LINK <library>/boost/stacktrace//boost_stacktrace_backtrace $(BT_DEPS) ;
38- local LINKSHARED_UNWD = <link>shared <define>BOOST_STACKTRACE_DYN_LINK <library>/boost/stacktrace//boost_stacktrace_addr2line $(UNWD_DEPS) ;
39- local LINKSHARED_WIND = <link>shared <define>BOOST_STACKTRACE_DYN_LINK <library>/boost/stacktrace//boost_stacktrace_windbg $(WIND_DEPS) ;
40- local LINKSHARED_NOOP = <link>shared <define>BOOST_STACKTRACE_DYN_LINK <library>/boost/stacktrace//boost_stacktrace_noop $(NOOP_DEPS) ;
36+ local BT_DEPS = $(HIDE_SYMBS) <target-os>linux:<library>dl <library>backtrace [ check-target-builds ../build//libbacktrace : : <build>no ] ;
37+ local UNWD_DEPS = $(HIDE_SYMBS) <target-os>linux:<library>dl [ check-target-builds ../build//addr2line : : <build>no ] ;
38+ local WIND_DEPS = $(HIDE_SYMBS) <library>Dbghelp [ check-target-builds ../build//WinDbg : : <build>no ] ;
39+ local NOOP_DEPS = $(HIDE_SYMBS) ;
40+ local BASIC_DEPS = $(RDYNAMIC) <target-os>linux:<library>dl [ check-target-builds ../build//WinDbg : <build>no ] ;
41+
42+ local LINKSHARED_BT = <link>shared <define>BOOST_STACKTRACE_DYN_LINK <library>/boost/stacktrace//boost_stacktrace_backtrace $(BT_DEPS) ;
43+ local LINKSHARED_UNWD = <link>shared <define>BOOST_STACKTRACE_DYN_LINK <library>/boost/stacktrace//boost_stacktrace_addr2line $(UNWD_DEPS) ;
44+ local LINKSHARED_WIND = <link>shared <define>BOOST_STACKTRACE_DYN_LINK <library>/boost/stacktrace//boost_stacktrace_windbg $(WIND_DEPS) ;
45+ local LINKSHARED_NOOP = <link>shared <define>BOOST_STACKTRACE_DYN_LINK <library>/boost/stacktrace//boost_stacktrace_noop $(NOOP_DEPS) ;
46+ local LINKSHARED_BASIC = <link>shared <define>BOOST_STACKTRACE_DYN_LINK <library>/boost/stacktrace//boost_stacktrace_basic $(BASIC_DEPS) ;
4147
4248lib test_impl_lib_backtrace : test_impl.cpp : $(LINKSHARED_BT) ;
4349lib test_impl_lib_addr2line : test_impl.cpp : $(LINKSHARED_UNWD) ;
4450lib test_impl_lib_windbg : test_impl.cpp : $(LINKSHARED_WIND) ;
4551lib test_impl_lib_noop : test_impl.cpp : $(LINKSHARED_NOOP) ;
4652
53+ obj test_impl_nohide-obj : test_impl.cpp : $(LINKSHARED_BASIC) ;
54+ lib test_impl_lib_basic : test_impl_nohide-obj : $(LINKSHARED_BASIC) ;
55+
4756test-suite stacktrace_tests
4857 :
4958 # Header only tests
50- [ run test.cpp test_impl.cpp : : : <define>BOOST_STACKTRACE_USE_BACKTRACE $(BT_DEPS) : backtrace_ho ]
51- [ run test.cpp test_impl.cpp : : : <define>BOOST_STACKTRACE_USE_ADDR2LINE $(UNWD_DEPS) : addr2line_ho ]
52- [ run test .cpp test_impl.cpp : : : <define>BOOST_STACKTRACE_USE_WINDBG $(WIND_DEPS) : windbg_ho ]
53- [ run test_noop .cpp test_impl.cpp : : : <define>BOOST_STACKTRACE_USE_NOOP $(NOOP_DEPS) : noop_ho ]
54- [ run test.cpp test_impl.cpp : : : $(AUTO_DEPS) : autodetect_ho ]
59+ [ run test.cpp test_impl.cpp : : : <define>BOOST_STACKTRACE_USE_BACKTRACE $(BT_DEPS) : backtrace_ho ]
60+ [ run test.cpp test_impl.cpp : : : <define>BOOST_STACKTRACE_USE_ADDR2LINE $(UNWD_DEPS) : addr2line_ho ]
61+ [ run test_noop .cpp test_impl.cpp : : : <define>BOOST_STACKTRACE_USE_NOOP $(NOOP_DEPS) : noop_ho ]
62+ [ run test .cpp test_impl.cpp : : : $(WIND_DEPS) : windbg_ho ]
63+ [ run test.cpp test_impl.cpp : : : $(BASIC_DEPS) : basic_ho ]
5564
5665 # Test with shared linked backends
57- [ run test.cpp : : : <library>.//test_impl_lib_backtrace $(LINKSHARED_BT) : backtrace_lib ]
58- [ run test.cpp : : : <library>.//test_impl_lib_addr2line $(LINKSHARED_UNWD) : addr2line_lib ]
59- [ run test.cpp : : : <library>.//test_impl_lib_windbg $(LINKSHARED_WIND) : windbg_lib ]
60- [ run test_noop.cpp : : : <library>.//test_impl_lib_noop $(LINKSHARED_NOOP) : noop_lib ]
66+ [ run test.cpp : : : <library>.//test_impl_lib_backtrace $(LINKSHARED_BT) : backtrace_lib ]
67+ [ run test.cpp : : : <library>.//test_impl_lib_addr2line $(LINKSHARED_UNWD) : addr2line_lib ]
68+ [ run test.cpp : : : <library>.//test_impl_lib_windbg $(LINKSHARED_WIND) : windbg_lib ]
69+ [ run test_noop.cpp : : : <library>.//test_impl_lib_noop $(LINKSHARED_NOOP) : noop_lib ]
70+ [ run test.cpp : : : <library>.//test_impl_lib_basic $(LINKSHARED_BASIC) : basic_lib ]
6171 ;
6272
6373# Assuring that examples compile and run. Adding sources from `examples` directory to the `type_index` test suite.
6474for local p in [ glob ../example/*.cpp ]
6575{
66- stacktrace_tests += [ run $(p) : : : $(LINKSHARED_BT) : backtrace_$(p[1]:B) ] ;
67- stacktrace_tests += [ run $(p) : : : $(LINKSHARED_UNWD) : addr2line_$(p[1]:B) ] ;
68- stacktrace_tests += [ run $(p) : : : $(LINKSHARED_WIND) : windbg_$(p[1]:B) ] ;
69- stacktrace_tests += [ run $(p) : : : $(LINKSHARED_NOOP) : noop_$(p[1]:B) ] ;
70- stacktrace_tests += [ run $(p) : : : $(AUTO_DEPS) : autodetect_ $(p[1]:B) ] ;
76+ stacktrace_tests += [ run $(p) : : : $(LINKSHARED_BT) : backtrace_$(p[1]:B) ] ;
77+ stacktrace_tests += [ run $(p) : : : $(LINKSHARED_UNWD) : addr2line_$(p[1]:B) ] ;
78+ stacktrace_tests += [ run $(p) : : : $(LINKSHARED_WIND) : windbg_$(p[1]:B) ] ;
79+ stacktrace_tests += [ run $(p) : : : $(LINKSHARED_NOOP) : noop_$(p[1]:B) ] ;
80+ stacktrace_tests += [ run $(p) : : : $(LINKSHARED_BASIC) : basic_ $(p[1]:B) ] ;
7181
7282}
7383
0 commit comments