SkForceCPlusPlusLinking.cpp 870 B

1234567891011121314151617181920
  1. /*
  2. * Copyright 2014 Google Inc.
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. // This file is intentionally empty. We add it to the dependencies of skia_lib
  8. // so that GYP detects that libskia is a C++ library (implicitly depending on
  9. // the standard library, -lm, etc.) from its file extension.
  10. //
  11. // If we didn't do this, GYP would link libskia.so as a C library and we'd get
  12. // link-time failures for simple binaries that don't themselves depend on the
  13. // C++ standard library.
  14. //
  15. // Even if we try hard not to depend on the standard library, say, never
  16. // calling new or delete, the compiler can still insert calls on our behalf
  17. // that make us depend on it anyway: a handler when we call a for a pure
  18. // virtual, thread-safety guards around statics, probably other similar
  19. // language constructs.