Commit Graph

447 Commits

Author SHA1 Message Date
Bruce Mitchener
aa446b0540
Fix typos. (#90) 2024-02-18 00:10:21 -06:00
ethanol20924
c3b38381ab
Small fix to allow for compiling with Homebrew installed Clang on Mac (#89)
When building with Clang installed with Homebrew:

```
-- The C compiler identification is Clang 17.0.6
-- The CXX compiler identification is Clang 17.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/homebrew/opt/llvm/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/homebrew/opt/llvm/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
```

I get the following error:

```
/opt/homebrew/opt/llvm/bin/llvm-ranlib: error: Invalid option: '-no_warning_for_no_symbols'
make[2]: *** [_deps/zstd-build/lib/libzstd.a] Error 1
make[2]: *** Deleting file `_deps/zstd-build/lib/libzstd.a'
make[1]: *** [_deps/zstd-build/lib/CMakeFiles/libzstd_static.dir/all] Error 2
make: *** [all] Error 2
```

If I instead build with AppleClang:

```
-- The C compiler identification is AppleClang 15.0.0.15000100
-- The CXX compiler identification is AppleClang 15.0.0.15000100
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
```

It works as expected.

Source of the problem is found at `CMakeLists.txt:282`:

```CMake
if(APPLE)
  SET(CMAKE_C_ARCHIVE_FINISH   "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
  SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
endif()
```

Changing it to check specifically for AppleClang appears to fix the
problem for me:

```CMake
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
  SET(CMAKE_C_ARCHIVE_FINISH   "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
  SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
endif()
```
2024-02-16 11:28:38 -06:00
Leandro SQ
8d2728d0f0
fix: Broken link on README.md (#88)
This pull request includes a minor change to the `README.md` file. The
change updates the link to the `signal-safe-tracing.md` file, moving it
into the `docs` directory.
2024-02-15 12:36:28 -06:00
Jeremy
7fda402638
Bump to 0.4.0 2024-02-11 12:41:21 -06:00
Jeremy
203dbb524e
Merge branch 'dev' into main 2024-02-11 12:09:13 -06:00
Jeremy
bc662438f3
Small cmake adjustments 2024-02-11 11:53:33 -06:00
Jeremy
c771c4d3f5
Update #include for ctrace docs 2024-02-11 11:44:31 -06:00
Jeremy
e166c9804d
Update standalone instructions 2024-02-11 11:43:32 -06:00
Jeremy
90802c6be1
deal with a warning under testing build that's annoyed me for a while 2024-02-11 02:11:12 -06:00
Jeremy
58d09dd010
Remove CPPTRACE_NO_EXPORT_ATTR / CPPTRACE_DEPRECATED_ATTR as they aren't used 2024-02-11 02:05:21 -06:00
Jeremy
9a7c45bda7
remove return that wasn't needed 2024-02-11 02:05:00 -06:00
Jeremy
40bc2992b2
re-add something that's useful during testing 2024-02-11 02:00:53 -06:00
Jeremy
cdaab64be2
Revert "Printbug"
This reverts commit 2e9c586ba7.
2024-02-11 01:58:29 -06:00
Jeremy
612d5e6d65
Fix architecture handling in load_mach 2024-02-11 01:53:57 -06:00
Jeremy
2e9c586ba7
Printbug 2024-02-11 01:49:46 -06:00
Jeremy
37630f479d
Try to make fat mach architecture handling more robust 2024-02-08 00:38:56 -06:00
Jeremy
59272bccd6
printbug... 2024-02-07 22:37:55 -06:00
Jeremy
41f37a3446
Run on the new macos 14 runners with a newer default xcode to try to workaround a linker internal error 2024-02-07 22:24:48 -06:00
Jeremy
df6e02087e
Update for vcpkg 2024-02-07 22:08:45 -06:00
Jeremy
60dd6b5065
Fix issues related to export directives 2024-02-07 21:40:52 -06:00
Jeremy
adefa5c234
Bump libdwarf hashes and use the lightweight mirror 2024-02-07 21:34:41 -06:00
Jeremy
683c046f87
Forgot to commit readme update 2024-02-07 21:26:03 -06:00
Jeremy
68f919f292
Add ctrace documentation 2024-02-07 00:11:48 -06:00
Jeremy
78dd053f21
Light ctrace refactoring 2024-02-06 23:10:02 -06:00
Jeremy
ead847ad70
Fix main invocation 2024-02-06 09:08:22 -06:00
Jeremy
8b8bd1b5df
Test findpackage for msvc too 2024-02-06 00:00:45 -06:00
Jeremy
f972c43420
Copy the dll 2024-02-05 23:51:02 -06:00
Jeremy
6525b125ef
Two small fixes 2024-02-05 23:40:08 -06:00
Jeremy
74ed63f3ff
Fix some funny business 2024-02-05 23:37:33 -06:00
Jeremy
7c9b3ed635
Try to test mingw findpackage integration 2024-02-05 23:35:06 -06:00
Jeremy
f13e2a0d7b
Test cmake integration with shared too 2024-02-05 00:03:22 -06:00
Jeremy
5232bb04fd
Use CPPTRACE_USE_EXTERNAL_ZSTD in CI 2024-02-04 14:42:05 -06:00
Jeremy
5e65ccecc0
Add external zstd option 2024-02-04 14:35:49 -06:00
Jeremy
eea0fcd118
Update table of contents 2024-02-04 14:20:04 -06:00
Jeremy
46069760c6
Fix a readme editing error, somehow I cropped a paragraph 2024-02-04 14:18:13 -06:00
Jeremy
8f9e8c5c1b
Some formatting consistency tweaks 2024-02-04 13:58:57 -06:00
Jeremy
a3e3916daa
Fix issue with trying to call detail::enable_virtual_terminal_processing_if_needed unconditionally on print 2024-02-04 13:56:46 -06:00
Jeremy
ab2d440a00
Update cpptrace exceptions to defer trace generation to the callsite with a default argument 2024-02-04 13:40:12 -06:00
Jeremy
2f7f5107a5
Add ctrace interface for enable_inlined_call_resolution 2024-02-04 11:10:37 -06:00
Jeremy
36d1dbf9e6
Add ctrace export annotations 2024-02-04 11:08:18 -06:00
Jeremy
d7aac52f8b
Add configuration to control resolution of inlined calls 2024-02-04 11:03:03 -06:00
Jeremy
589d87063a
Small header refactor 2024-02-04 10:48:55 -06:00
Jeremy
c161293e89
Update for zstd target handling again 2024-02-04 00:17:25 -06:00
Jeremy
ab9a832a30
Try to get some updated libdwarf/zstd handling 2024-02-04 00:00:12 -06:00
Jeremy Rifkin
a65aed2752
Aquire zstd with fetchcontent for libdwarf 9 (#85) 2024-02-01 00:14:48 -06:00
Jeremy
6b87927acf
No longer try to install build/include 2024-01-29 23:31:40 -06:00
Jeremy
5fde4081dc
Replace the cmake generated export header 2024-01-29 23:26:18 -06:00
Jeremy
b1ff59b59c
Update ctrace demo to be a .c 2024-01-29 23:18:21 -06:00
Jeremy
b8c66cd855
Remove old comment 2024-01-29 22:29:35 -06:00
Jeremy
58837d7069
Fix cpptrace-config-cmake issue 2024-01-29 22:18:15 -06:00