AnDiXL commented on code in PR #3698:
URL: https://github.com/apache/brpc/pull/3698#discussion_r4438880626


##########
config_brpc.sh:
##########
@@ -396,6 +396,14 @@ else
     print_success "Found protobuf version $PROTOBUF_VERSION"
 fi
 
+# Cacheline-aligned types such as ResourcePool<Socket> are created with plain
+# `new'. C++17 honors their alignment by default, C++14 only with
+# -faligned-new; without it glibc returns 16-byte aligned storage.
+if echo 'int main() { return 0; }' | \
+        $CXX $CXXFLAGS -faligned-new -x c++ - -o /dev/null >/dev/null 2>&1; 
then
+    CXXFLAGS="${CXXFLAGS} -faligned-new"
+fi

Review Comment:
   Fixed. `config_brpc.sh` now exits with an error in that case instead of 
writing `config.mk`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to