aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-12-04 08:39:35 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-12-04 08:39:35 +0200
commit4168cda2363f3d796d0b9922852e249aac3131ba (patch)
tree3e74f8926ad2efe57ac8ffbeb03a8585f285e618 /libbuild2/cc
parent864d84abcf1579b81f54d8d3f79520137d81f629 (diff)
Mark Buildfile functions as pure or impure
Diffstat (limited to 'libbuild2/cc')
-rw-r--r--libbuild2/cc/functions.cxx18
1 files changed, 12 insertions, 6 deletions
diff --git a/libbuild2/cc/functions.cxx b/libbuild2/cc/functions.cxx
index 98f7f97..c8b9d09 100644
--- a/libbuild2/cc/functions.cxx
+++ b/libbuild2/cc/functions.cxx
@@ -150,8 +150,10 @@ namespace build2
// after all the specified library targets have been matched. Normally
// it is used in ad hoc recipes to implement custom compilation.
//
+ // Note that this function is not pure.
//
- f[".lib_poptions"].insert<lib_data, names, names> (
+ f.insert (".lib_poptions", false).
+ insert<lib_data, names, names> (
&lib_thunk<appended_libraries>,
lib_data {
x,
@@ -189,8 +191,10 @@ namespace build2
// after all the specified library targets have been matched. Normally
// it is used in ad hoc recipes to implement custom linking.
//
- f[".lib_libs"].insert<lib_data,
- names, names, optional<names>, optional<names>> (
+ // Note that this function is not pure.
+ //
+ f.insert (".lib_libs", false).
+ insert<lib_data, names, names, optional<names>, optional<names>> (
&lib_thunk<appended_libraries>,
lib_data {
x,
@@ -237,13 +241,15 @@ namespace build2
//
// Note that passing multiple targets at once is not a mere convenience:
// this also allows for more effective duplicate suppression.
-
+ //
// Note also that this function can only be called during execution
// after all the specified library targets have been matched. Normally
// it is used in ad hoc recipes to implement custom linking.
//
- f[".lib_rpaths"].insert<lib_data,
- names, names, optional<names>, optional<names>> (
+ // Note that this function is not pure.
+ //
+ f.insert (".lib_rpaths", false).
+ insert<lib_data, names, names, optional<names>, optional<names>> (
&lib_thunk<rpathed_libraries>,
lib_data {
x,