[lld] [lld][AArch64] Add support for GCS (PR #90732)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri May 3 10:55:49 PDT 2024


================
@@ -560,6 +564,25 @@ static uint8_t getZStartStopVisibility(opt::InputArgList &args) {
   return ret;
 }
 
+static StringRef getZGcs(opt::InputArgList &args) {
+  StringRef ret = "implicit";
+  for (auto *arg : args.filtered(OPT_z)) {
+    std::pair<StringRef, StringRef> kv = StringRef(arg->getValue()).split('=');
+    if (kv.first == "gcs") {
+      arg->claim();
+      if (kv.second == "implicit" || kv.second == "always" ||
----------------
MaskRay wrote:

We shall define a `GcsPolicy`. I believe we can reuse it or will soon need it for other things.

https://github.com/llvm/llvm-project/pull/90732


More information about the llvm-commits mailing list