summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@gmail.com>2023-04-15 16:28:33 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2023-04-26 18:29:44 +0200
commitd762bfa1953933dfac0a29a74523c25719396b8c (patch)
tree1002b0aecc1af698f0349a4efb4bfc169886c60a /etc
parent03e1019aca5d08e53bfeb455071d91561fc33039 (diff)
downloadjustbuild-d762bfa1953933dfac0a29a74523c25719396b8c.tar.gz
imports: Switch to Microsoft GSL implementation
... with two minor code base changes compared to previous use of gsl-lite: - dag.hpp: ActionNode::Ptr and ArtifactNode::Ptr are not wrapped in gsl::not_null<> anymore, due to lack of support for wrapping std::unique_ptr<>. More specifically, the move constructor is missing, rendering it impossible to use std::vector<>::emplace_back(). - utils/cpp/gsl.hpp: New header file added to implement the macros ExpectsAudit() and EnsureAudit(), asserts running only in debug builds, which were available in gsl-lite but are missing in MS GSL.
Diffstat (limited to 'etc')
-rw-r--r--etc/defaults/CC/TARGETS.just24
-rw-r--r--etc/dev/TARGETS2
-rw-r--r--etc/import.pkgconfig/TARGETS.gsl6
-rw-r--r--etc/import/TARGETS.gsl12
-rw-r--r--etc/repos.json18
5 files changed, 25 insertions, 37 deletions
diff --git a/etc/defaults/CC/TARGETS.just b/etc/defaults/CC/TARGETS.just
index ea501e09..66033bef 100644
--- a/etc/defaults/CC/TARGETS.just
+++ b/etc/defaults/CC/TARGETS.just
@@ -12,21 +12,13 @@
, "-pedantic-errors"
]
, "ADD_CXXFLAGS":
- { "type": "++"
- , "$1":
- [ [ "-std=c++20"
- , "-Wall"
- , "-Wextra"
- , "-Wpedantic"
- , "-Wsign-conversion"
- , "-Werror"
- , "-pedantic-errors"
- ]
- , { "type": "if"
- , "cond": {"type": "var", "name": "DEBUG"}
- , "then": ["-Dgsl_CONFIG_CONTRACT_CHECKING_AUDIT=1"]
- }
- ]
- }
+ [ "-std=c++20"
+ , "-Wall"
+ , "-Wextra"
+ , "-Wpedantic"
+ , "-Wsign-conversion"
+ , "-Werror"
+ , "-pedantic-errors"
+ ]
}
}
diff --git a/etc/dev/TARGETS b/etc/dev/TARGETS
index 40fdcf52..725f884e 100644
--- a/etc/dev/TARGETS
+++ b/etc/dev/TARGETS
@@ -11,7 +11,7 @@
, "targets":
[ ["@", "ssl", "", "crypto"]
, ["@", "grpc", "", "grpc++"]
- , ["@", "gsl-lite", "", "gsl-lite"]
+ , ["@", "gsl", "", "gsl"]
, ["@", "fmt", "", "fmt"]
, ["@", "cli11", "", "cli11"]
, ["@", "json", "", "json"]
diff --git a/etc/import.pkgconfig/TARGETS.gsl b/etc/import.pkgconfig/TARGETS.gsl
index e73040f5..866c3fcf 100644
--- a/etc/import.pkgconfig/TARGETS.gsl
+++ b/etc/import.pkgconfig/TARGETS.gsl
@@ -1,5 +1,3 @@
-{ "gsl-lite":
- { "type": ["@", "rules", "CC/pkgconfig", "system_library"]
- , "name": ["gsl-lite"]
- }
+{ "gsl":
+ {"type": ["@", "rules", "CC/pkgconfig", "system_library"], "name": ["gsl"]}
}
diff --git a/etc/import/TARGETS.gsl b/etc/import/TARGETS.gsl
index d22e25b2..a769eac9 100644
--- a/etc/import/TARGETS.gsl
+++ b/etc/import/TARGETS.gsl
@@ -1,11 +1,7 @@
-{ "gsl-lite":
+{ "gsl":
{ "type": ["@", "rules", "CC", "library"]
- , "name": ["gsl-lite"]
- , "hdrs": ["gsl-lite hdrs"]
- }
-, "gsl-lite hdrs":
- { "type": "tree"
- , "name": "gsl-lite"
- , "deps": ["gsl", "gsl-lite.h", "gsl-lite.hpp", "gsl-lite-vc6.hpp"]
+ , "name": ["gsl"]
+ , "hdrs": [["TREE", null, "."]]
+ , "stage": ["gsl"]
}
}
diff --git a/etc/repos.json b/etc/repos.json
index f6bfb68b..44bf6698 100644
--- a/etc/repos.json
+++ b/etc/repos.json
@@ -5,7 +5,7 @@
, "bindings":
{ "rules": "rules-just"
, "just-distfiles": "just-distfiles"
- , "gsl-lite": "gsl-lite"
+ , "gsl": "com_github_microsoft_gsl"
, "cli11": "cli11"
, "json": "json"
, "fmt": "fmt"
@@ -27,7 +27,7 @@
{ "repository":
{ "type": "distdir"
, "repositories":
- [ "gsl-lite"
+ [ "com_github_microsoft_gsl"
, "cli11"
, "json"
, "fmt"
@@ -138,18 +138,20 @@
{"type": "file", "path": "etc/import", "pragma": {"to_git": true}}
, "pkg_bootstrap": {"local_path": "etc/import.pkgconfig"}
}
- , "gsl-lite":
+ , "com_github_microsoft_gsl":
{ "repository":
{ "type": "archive"
- , "content": "6a2245941d8a713897f439c35512593683f6ad48"
- , "fetch": "https://github.com/gsl-lite/gsl-lite/archive/v0.40.0.tar.gz"
- , "sha256": "65af4ec8a1050dac4f1ca4622881bb02a9c3978a9baec289fb56e25412d6cac7"
- , "sha512": "afd65009bf33f54cd1caf1988b725e618bee4f4f779825ae1df55017034c6fff75feaa737a358a7f5e690757637f4d281c2f22d06c39efb81dacd7d1949251df"
- , "subdir": "gsl-lite-0.40.0/include/gsl"
+ , "content": "386f0a89a47763481223a63d5026215af8d3c827"
+ , "fetch": "https://github.com/microsoft/GSL/archive/refs/tags/v4.0.0.tar.gz"
+ , "sha256": "f0e32cb10654fea91ad56bde89170d78cfbf4363ee0b01d8f097de2ba49f6ce9"
+ , "sha512": "7fa7446796c6bf82fb3bff09f86a69c446a27be528bef3b17c8bc5ad2f24d5cf86bdb3d3813ecb44726e8f395020180e97e41027330d1fbf545cc0f0b44aac29"
+ , "subdir": "GSL-4.0.0/include/gsl"
}
, "target_root": "import targets"
, "target_file_name": "TARGETS.gsl"
, "bindings": {"rules": "rules"}
+ , "bootstrap": {"include_name": "gsl"}
+ , "pkg_bootstrap": {"local_path": "include/gsl"}
}
, "cli11":
{ "repository":