Siman 383
Presented here for study, not as a practical ruling. The Shulchan Aruch rules by Sephardi custom, the Rema's glosses by Ashkenazi custom, and the Kitzur follows Ashkenazi custom. For a practical question, ask your rabbi.
א עַכּוּ"ם הַדָּר עִם שְׁנֵי יִשְׂרָאֵלִים וְאֵין הָעַכּוּ"ם בְּבֵיתוֹ, אֵינוֹ אוֹסֵר עַיֵּן לְעֵיל סִימָן שע"א וִיעָרְבוּ וְיִהְיוּ מֻתָּרִים. בָּא עַכּוּ"ם בְּשַׁבָּת, אוֹסֵר וְהָעֵרוּב בָּטֵל. וּמִיהוּ יְכוֹלִים לִשְׂכֹּר מִמֶּנּוּ בְּשַׁבָּת, וְאַחַר כָּךְ יְבַטֵּל הָאֶחָד לַחֲבֵרוֹ וְיִהְיֶה הַיָּחִיד מֻתָּר; וְכָל שֶׁכֵּן אִם מֵת הָעַכּוּ"ם בְּשַׁבָּת, שֶׁיְּבַטֵּל אֶחָד לַחֲבֵרוֹ וְיִהְיֶה הַיָּחִיד מֻתָּר.
1 When the non-Jew is not in the house, he does not prevent [the eruv]. And it contains one paragraph. A non-Jew who lives with two Jews, when the non-Jew is not in his home, does not prohibit (see above, siman 371), and they may make an eruv and be permitted. If the non-Jew comes on Shabbat, he prohibits and the eruv is nullified. However, they can rent from him on Shabbat, and afterwards one can nullify his domain to the other, and the individual will be permitted. And all the more so, if the non-Jew died on Shabbat, one can nullify his domain to the other and the individual will be permitted.