From f070670e77fe36ece1a89ce00c13419de354b9ce Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Thu, 23 Feb 2023 10:00:21 -0600 Subject: dependencies: add custom atomic dependency Almost exactly the same as how the dl dependency works. On certain systems (like BSDs that use clang), stdatomic is provided by compiler-rt and doesn't need a separate library explictly linked. On a typical GNU/LINUX system, atomic is a separate library that must be explictly found and linked against. So just add a builtin and system method for these two use cases. --- docs/markdown/snippets/atomic-dependency.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/markdown/snippets/atomic-dependency.md (limited to 'docs/markdown/snippets') diff --git a/docs/markdown/snippets/atomic-dependency.md b/docs/markdown/snippets/atomic-dependency.md new file mode 100644 index 0000000..2eef5e0 --- /dev/null +++ b/docs/markdown/snippets/atomic-dependency.md @@ -0,0 +1,9 @@ +## New custom dependency for atomic + +``` +dependency('atomic') +``` + +checks for the availability of the atomic operation library. First, it looks +for the atomic library. If that is not found, then it will try to use what is +provided by the libc. -- cgit v1.1