Skip to content

Commit

Permalink
Force auc.cc to be statically linked (#8039)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwiwarmnfuzzy committed Jun 30, 2022
1 parent e88d6e0 commit 2407381
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/metric/auc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

namespace xgboost {
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
* AUC by 1 / (num_positive * num_negative), instead it returns a tuple for caller to
Expand Down
1 change: 1 addition & 0 deletions src/metric/metric.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ DMLC_REGISTRY_ENABLE(::xgboost::MetricGPUReg);
namespace xgboost {
namespace metric {
// 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(multiclass_metric);
DMLC_REGISTRY_LINK_TAG(survival_metric);
Expand Down

0 comments on commit 2407381

Please sign in to comment.