Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 565358 | Differences between
and this patch

Collapse All | Expand All

(-)a/tools/llvm-config/CMakeLists.txt (-3 / +8 lines)
Lines 22-33 get_property(COMPILE_FLAGS TARGET llvm-config PROPERTY COMPILE_FLAGS) Link Here
22
set(LLVM_SRC_ROOT ${LLVM_MAIN_SRC_DIR})
22
set(LLVM_SRC_ROOT ${LLVM_MAIN_SRC_DIR})
23
set(LLVM_OBJ_ROOT ${LLVM_BINARY_DIR})
23
set(LLVM_OBJ_ROOT ${LLVM_BINARY_DIR})
24
set(LLVM_CPPFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
24
set(LLVM_CPPFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
25
set(LLVM_CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
25
# Just use CMAKE_CPP_FLAGS for CFLAGS and CXXFLAGS, otherwise compiler
26
set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}")
26
# specific flags will be set when we don't know what compiler will be used
27
# with external project utilising llvm-config.  C++ Standard is required.
28
# TODO: figure out if we can remove -std=c++11 and move it to revdeps.
29
set(LLVM_CFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
30
set(LLVM_CXXFLAGS "${CMAKE_CPP_FLAGS} -std=c++11 ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
27
# Use the C++ link flags, since they should be a superset of C link flags.
31
# Use the C++ link flags, since they should be a superset of C link flags.
28
set(LLVM_LDFLAGS "${CMAKE_CXX_LINK_FLAGS}")
32
set(LLVM_LDFLAGS "${CMAKE_CXX_LINK_FLAGS}")
29
set(LLVM_BUILDMODE ${CMAKE_BUILD_TYPE})
33
set(LLVM_BUILDMODE ${CMAKE_BUILD_TYPE})
30
set(LLVM_SYSTEM_LIBS ${SYSTEM_LIBS})
34
# We don't do static libs, so we don't need to supply any system-libs
35
set(LLVM_SYSTEM_LIBS "")
31
string(REPLACE ";" " " LLVM_TARGETS_BUILT "${LLVM_TARGETS_TO_BUILD}")
36
string(REPLACE ";" " " LLVM_TARGETS_BUILT "${LLVM_TARGETS_TO_BUILD}")
32
configure_file(${BUILDVARIABLES_SRCPATH} ${BUILDVARIABLES_OBJPATH} @ONLY)
37
configure_file(${BUILDVARIABLES_SRCPATH} ${BUILDVARIABLES_OBJPATH} @ONLY)
33
38
(-)a/tools/llvm-config/llvm-config.cpp (-6 / +16 lines)
Lines 323-332 int main(int argc, char **argv) { Link Here
323
#else
323
#else
324
        OS << "ON\n";
324
        OS << "ON\n";
325
#endif
325
#endif
326
      } else if (Arg == "--obj-root") {
326
      } else if (Arg == "--obj-root" || Arg == "--src-root") {
327
        OS << ActivePrefix << '\n';
327
        if (IsInDevelopmentTree) {
328
      } else if (Arg == "--src-root") {
328
          if (Arg == "--obj-root") {
329
        OS << LLVM_SRC_ROOT << '\n';
329
            OS << ActivePrefix << '\n';
330
          } else {
331
            OS << LLVM_SRC_ROOT << '\n';
332
          }
333
        } else {
334
          // sources are not installed
335
          llvm::errs() << "llvm-config: sources not installed, "
336
                       << Arg << " not available\n";
337
          exit(1);
338
        }
330
      } else {
339
      } else {
331
        usage();
340
        usage();
332
      }
341
      }
Lines 360-367 int main(int argc, char **argv) { Link Here
360
          OS << ActiveLibDir << '/' << Lib;
369
          OS << ActiveLibDir << '/' << Lib;
361
        } else if (PrintLibs) {
370
        } else if (PrintLibs) {
362
          // If this is a typical library name, include it using -l.
371
          // If this is a typical library name, include it using -l.
363
          if (Lib.startswith("lib") && Lib.endswith(".a")) {
372
          if (Lib.startswith("lib") && Lib.endswith(LTDL_SHLIB_EXT)) {
364
            OS << "-l" << Lib.slice(3, Lib.size()-2);
373
            // sizeof counts trailing NUL
374
            OS << "-l" << Lib.slice(3, Lib.size()-sizeof(LTDL_SHLIB_EXT)+1);
365
            continue;
375
            continue;
366
          }
376
          }
367
377
(-)a/utils/llvm-build/llvmbuild/main.py (-2 / +3 lines)
Lines 393-398 subdirectories = %s Link Here
393
//
393
//
394
//===----------------------------------------------------------------------===//
394
//===----------------------------------------------------------------------===//
395
395
396
#include "llvm/Config/config.h"
397
396
""")
398
""")
397
        f.write('struct AvailableComponent {\n')
399
        f.write('struct AvailableComponent {\n')
398
        f.write('  /// The name of the component.\n')
400
        f.write('  /// The name of the component.\n')
Lines 413-419 subdirectories = %s Link Here
413
            if library_name is None:
415
            if library_name is None:
414
                library_name_as_cstr = '0'
416
                library_name_as_cstr = '0'
415
            else:
417
            else:
416
                library_name_as_cstr = '"lib%s.a"' % library_name
418
                library_name_as_cstr = '"lib%s" LTDL_SHLIB_EXT' % library_name
417
            f.write('  { "%s", %s, %d, { %s } },\n' % (
419
            f.write('  { "%s", %s, %d, { %s } },\n' % (
418
                name, library_name_as_cstr, is_installed,
420
                name, library_name_as_cstr, is_installed,
419
                ', '.join('"%s"' % dep
421
                ', '.join('"%s"' % dep
420
- 

Return to bug 565358