ro added inline comments.
================ Comment at: clang/test/Driver/solaris-ld.c:46 // CHECK-LD-SPARC64-SAME: "-L[[SYSROOT]]/usr/lib/sparcv9" +// CHECK-LD-SPARC64-NOT: "-zignore" +// CHECK-LD-SPARC64-NOT: "-latomic" ---------------- ro wrote: > MaskRay wrote: > > Such NOT patterns are usually inadequate and may go stale pretty easily, > > since technically the patterns can occur in many places. > > > > One idea is to use --implicit-check-not; another is to enumerate all > > options and use the `{{^}}` style I picked in linux-cross.cpp, but perhaps > > your style is good enough if we can remember these library after after -L > > and before -lgcc_s > > Such NOT patterns are usually inadequate and may go stale pretty easily, > > since technically the patterns can occur in many places. > > I wondered so myself: while this is currently the only instance of > `-zignore`/`-zrecord`, `-lgcc_s` requires similar treatment. > > > One idea is to use --implicit-check-not; another is to enumerate all > > options and use the `{{^}}` style I picked in linux-cross.cpp, but perhaps > > your style is good enough if we can remember these library after after -L > > and before -lgcc_s > > I'll check those. However, it occured to me that the crucial check is that > `-latomic` isn't added at all, `-zignore`/`-zrecord` or no, so maybe just > check for that and avoid the issue for the moment. In the end, I've decided to go for the simple `*-NOT: "-latomic" form: it's simple and robust, which is all the more important since this patch needs to go into the `release/14.x` branch, too. Going forward, I thing going for the `linux-cross.cpp` style is best. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118021/new/ https://reviews.llvm.org/D118021 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits