Force auc.cc to be statically linked (#8039)

This commit is contained in:
kiwiwarmnfuzzy 2022-06-30 13:24:22 +02:00 committed by GitHub
parent e88d6e071d
commit 2407381c3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -25,6 +25,8 @@
namespace xgboost { namespace xgboost {
namespace metric { namespace metric {
// tag the this file, used by force static link later.
DMLC_REGISTRY_FILE_TAG(auc);
/** /**
* Calculate AUC for binary classification problem. This function does not normalize the * Calculate AUC for binary classification problem. This function does not normalize the
* AUC by 1 / (num_positive * num_negative), instead it returns a tuple for caller to * AUC by 1 / (num_positive * num_negative), instead it returns a tuple for caller to

View File

@ -78,6 +78,7 @@ DMLC_REGISTRY_ENABLE(::xgboost::MetricGPUReg);
namespace xgboost { namespace xgboost {
namespace metric { namespace metric {
// List of files that will be force linked in static links. // List of files that will be force linked in static links.
DMLC_REGISTRY_LINK_TAG(auc);
DMLC_REGISTRY_LINK_TAG(elementwise_metric); DMLC_REGISTRY_LINK_TAG(elementwise_metric);
DMLC_REGISTRY_LINK_TAG(multiclass_metric); DMLC_REGISTRY_LINK_TAG(multiclass_metric);
DMLC_REGISTRY_LINK_TAG(survival_metric); DMLC_REGISTRY_LINK_TAG(survival_metric);