1. Johannes Pfau
  2. gdc

Commits

Johannes Pfau  committed e7d0410 Merge

Merge

  • Participants
  • Parent commits 734c445, 4a24a82
  • Branches split-phobos2

Comments (0)

Files changed (2)

File d/patches/patch-toplev-4.6.x

  • Ignore whitespace
File contents unchanged.

File d/setup-gcc.sh

View file
  • Ignore whitespace
 echo "D_LANGUAGE_VERSION=$d_lang_version" > gcc/d/d-make-include
 
 # 0.9 Remove the Phobos directory if it already exists
-if test "$d_lang_version" = 1 -a -d libphobos; then
+if test -d libphobos; then
     rm -rf libphobos
-elif test "$d_lang_version" = 2; then
-    if test -d libphobos2; then
-        rm -rf libphobos2
-    fi
-    if test -d libdruntime; then
-        rm -rf libdruntime
-    fi
 fi
 
 
 # 1. Create a directory of links to the Phobos sources in the top-level
 # directory.
-if test "$d_lang_version" = 1; then
-    mkdir libphobos && \
-        cd libphobos && \
-        ../symlink-tree ../gcc/d/phobos > /dev/null && \
-        cd "$top" || exit 1
-# 1.1 If they are building D2, then create links to the druntime sources as
-# well
-elif test "$d_lang_version" = 2; then
-    mkdir libphobos2 && \
-        cd libphobos2 && \
-        ../symlink-tree ../gcc/d/phobos2 > /dev/null && \
-        cd "$top" || exit 1
-    mkdir libdruntime && \
-        cd libdruntime && \
-        ../symlink-tree ../gcc/d/druntime > /dev/null && \
-        cd "$top" || exit 1
+mkdir libphobos && \
+    cd libphobos && \
+    ../symlink-tree ../gcc/d/phobos$d_subdir_sfx > /dev/null && \
+    cd "$top" || exit 1
+
+# 1.1 If they are building D2, then create links to the druntime sources in
+# the top level directory
+if test "$d_lang_version" = 2; then
+    cd libphobos && \
+    ../symlink-tree ../gcc/d/druntime > /dev/null && \
+    cd "$top" || exit 1
 fi
 
 # 1.2 Create a directory of links to the Zlib sources in the libphobos
 # directory.
-#
-# TODO: Not sure how to handle this when GDC is merged into GCC. And for
-# out of tree builds we'll have to allow custom zlib source paths anyway.
-if test "$d_lang_version" = 1; then
-    mkdir libphobos/zlib && \
-        cd libphobos/zlib && \
-        ../../symlink-tree ../../gcc/d/zlib > /dev/null && \
-        cd "$top" || exit 1
-elif test "$d_lang_version" = 2; then
-    mkdir libphobos2/zlib && \
-        cd libphobos2/zlib && \
-        ../../symlink-tree ../../gcc/d/zlib > /dev/null && \
-        cd "$top" || exit 1
-fi
+mkdir libphobos/zlib && \
+    cd libphobos/zlib && \
+    ../../symlink-tree ../../gcc/d/zlib > /dev/null && \
+    cd "$top" || exit 1
 
 # 1.3 Patch the gcc version string
 cd gcc || exit 1